-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve StyxObjectStore notification mechanism #525
Comments
IssuesOut-of-order NotificationsInitial state notifications in particular are vulnerable to the out-of-order issue. This is because normal change notification events are queued with a specific snapshot version. But initial watch notifications evaluate lazily, at event dispatch time, to the most recent database snapshot. Consider the following event queue: An initial watch event Watchers added too earlyWatcher is added to the Acceptance CriteriaA snapshot identifier
Notifications
Suppose a burst of database modifications, resulting queue backlog of:
An initial watch notification is sent to a new watch subscriber only. Therefore each initial watch notification should be queued as a separate event. The relative ordering among initial watch notifications, and among the database change event must be preserved.
|
Fixed by: #537 |
The current mechanism is vulnerable to out-of-order notifications, whereby older database states can be emitted after newer ones. Given that it is not essential for all notifications to be emitted, only that the notifications that are emitted are in the correct order, it is possible to replace the queue implementation with one that:
Associated test failure
From Bamboo build #1140:
StyxObjectStoreTest
-Compute/Replace an existing value
can result in the watcher being added early to the DB, and so receiving an unexpected early update which fails the test. This test should be re-assessed.The text was updated successfully, but these errors were encountered: