This repository was archived by the owner on May 25, 2021. It is now read-only.
Continue to reopen DB and enum changes until DB reopens up-to-date #14
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.
Currently, indexes make an initial read of the database state and the index state, and then work to bring the index up-to-date with that sequence-point of the database. Once the index is caught up with this sequence-point, the indexing process halts (excepting the case where another consumer has requested the index state while the index updater was running; in that case, the indexing process finishes, then notices that another reader is waiting and starts again, reading off another sequence-point and working toward that.)
With this PR, the index updater will now repeatedly reopen the DB and check to see whether it has truly caught up, getting a new sequence-point to work against each time, all within the context of a single index update operation. This means that a synchronous index update (as is used when querying the index state) will only return when the index has been made fully current, rather than just having caught up to the point the DB was at when the index-update began.
COUCHDB-2955
BugzID: 14036