mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-08-28 10:54:59 +00:00
Merge branch 'master' into lattice-fix
This commit is contained in:
commit
5ef218977f
1 changed files with 7 additions and 0 deletions
7
api.go
7
api.go
|
|
@ -277,6 +277,13 @@ func (api *API) DeleteIndex(ctx context.Context, indexName string) error {
|
|||
api.server.logger.Errorf("problem sending DeleteIndex message: %s", err)
|
||||
return errors.Wrap(err, "sending DeleteIndex message")
|
||||
}
|
||||
// Delete ids allocated for index if any present
|
||||
snap := topology.NewClusterSnapshot(api.cluster.noder, api.cluster.Hasher, api.cluster.ReplicaN)
|
||||
if snap.IsPrimaryFieldTranslationNode(api.NodeID()) {
|
||||
if err := api.holder.ida.reset(indexName); err != nil {
|
||||
return errors.Wrap(err, "deleting id allocation for index")
|
||||
}
|
||||
}
|
||||
api.holder.Stats.Count(MetricDeleteIndex, 1, 1.0)
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue