Recover fully from a partial reindex failure - #327
Open
damilolaedwards wants to merge 1 commit into
Open
Conversation
When one search index rebuilt successfully but another failed in the same reindex pass, only the failed index was left parked. The one that succeeded stayed live under the new embedding model even though builtModel was never advanced to record that, so the runtime's own bookkeeping no longer matched what was actually live. Recovery also depended on the proxy's served model changing again on a later tick; if it reverted to the model builtModel already recorded, the model-change guard saw no difference and never retried, leaving the failed index parked indefinitely with no way back short of a restart. On a partial failure, park every index the reindex pass touched, not just the one that failed, so nothing is ever left live in a space the runtime isn't tracking. Track that a reindex is incomplete and have the background refresher retry on every tick while it is, regardless of whether the served model still looks different from what's recorded, so a retry against the same model can still succeed and fully restore service.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
When one search index rebuilt successfully but another failed in the same
reindex pass, only the failed index was left parked. The one that
succeeded stayed live under the new embedding model even though
builtModel was never advanced to record that, so the runtime's own
bookkeeping no longer matched what was actually live. Recovery also
depended on the proxy's served model changing again on a later tick; if it
reverted to the model builtModel already recorded, the model-change guard
saw no difference and never retried, leaving the failed index parked
indefinitely with no way back short of a restart.
On a partial failure, every index the reindex pass touched is now parked,
not just the one that failed, so nothing is ever left live in a space the
runtime isn't tracking. The runtime also tracks that a reindex is
incomplete and the background refresher retries on every tick while it
is, regardless of whether the served model still looks different from
what's recorded, so a retry against the same model can still succeed and
fully restore service.
Test plan
go test -race ./pkg/searchruntime/...partial failure where one index succeeds and another fails, and a
recovery once the same model is retried
go build ./...,go vet ./...