Skip to content

Commit

Permalink
MB-52931 Drop index (not just instance) after async recovery is done
Browse files Browse the repository at this point in the history
If an index drop is received while async recovery is in
progress, indexer will process the drop only after async
recovery is done. At this time, delete the index as there
is no concept of replica drop in serverless mode.

Otherwise, the index defnID will remain in meta and this
can lead to index creation failures when another index with
same name on same keyspace is created.

Change-Id: I743ebe269766fb8e13835a3fa5fbcc61bc74ef34
  • Loading branch information
varunv-cb committed Jan 11, 2023
1 parent f0fd572 commit 88dedad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion secondary/manager/lifecycle.go
Original file line number Diff line number Diff line change
Expand Up @@ -1030,7 +1030,7 @@ func (m *LifecycleMgr) handleInstAsyncRecoveryDone(content []byte) error {
"while async recovery was in progress", inst.InstId)

// Instance is dropped while async recovery is in progress. Drop the index
return m.DeleteIndexInstance(inst.Defn.DefnId, inst.InstId, true, false, true, common.NewShardRebalanceRequestContext())
return m.DeleteIndexInstance(inst.Defn.DefnId, inst.InstId, true, false, false, common.NewShardRebalanceRequestContext())
}

return nil
Expand Down

0 comments on commit 88dedad

Please sign in to comment.