Implement eventual consistency enforcement for the datadir catalog backend #484
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.
When performing several catalog updates, for example through the REST API, and especially if the rabbitmq event bus is under stress, catalog events may arrive out of order.
This is troublesome for the datadir catalog backend, as the add/modify event for a given CatalogInfo may arrive before the event for one of its dependencies. For example, the WorkspaceInfo for a StoreInfo does not yet exist in the local catalog.
The
EventuallyConsistentCatalogFacade
will delay such changes with missing dependencies until they're resolved. This is usually a matter of a few milliseconds.Also, when a web request is in progress, and an object is not found, the catalog facade will retry the operation for a configurable number of times and milliseconds, giving the eventual consistency enforcer a chance to having resolved a pending update.
The default configuration properties are as follow: