code: func (m *Manager) maybeFinishDrops(interrupt <-chan struct{}) error {
  	indexNeedsDrop := make([]bool, len(m.enabledIndexes))
  	err := m.db.View(func(dbTx database.Tx) error {
  		// None of the indexes needs to be dropped if the index tips
  		// bucket hasn't been created yet.
  		indexesBucket := dbTx.Metadata().Bucket(indexTipsBucketName)
  		if indexesBucket == nil {
  			return nil
  		}
  
  		// Mark the indexer as requiring a drop if one is already in
  		// progress.
  		for i, indexer := range m.enabledIndexes {
  			dropKey := indexDropKey(indexer.Key())
  			if indexesBucket.Get(dropKey) != nil {
  				indexNeedsDrop[i] = true
  			}
  		}
  
  		return nil
  	})
  	if err != nil {
  		return err
  	}
  
  	if interruptRequested(interrupt) {
  		return errInterruptRequested
  	}
  
  	// Finish dropping any of the enabled indexes that are already in the
  	// middle of being dropped.
  	for i, indexer := range m.enabledIndexes {
  		if !indexNeedsDrop[i] {
  			continue
  		}
  
  		log.Infof("Resuming %s drop", indexer.Name())
  		err := dropIndex(m.db, indexer.Key(), indexer.Name(), interrupt)
  		if err != nil {
  			return err
  		}
  	}
  
  	return nil
  }
docs: // maybeFinishDrops determines if each of the enabled indexes are in the middle
  // of being dropped and finishes dropping them when the are.  This is necessary
  // because dropping and index has to be done in several atomic steps rather than
  // one big atomic step due to the massive number of entries.