-
Notifications
You must be signed in to change notification settings - Fork 1
Incremental Updates: honor events before changed_at #237
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
base: main
Are you sure you want to change the base?
Conversation
As changes might not be committed in the database in a continuous linear fashions, elements out of order might get ignored. This change adds a window to the past for incrementalFetch, honoring older elements. The incrementalApplyPending function now compares the changed_at value for known elements, skipping those without a change.
Something to note about this PR change is that it will retry the changes within each table for the last ten minutes. Since it will silently abort if the changed_at value has not changed or the item is deleted again, it does no real work, but it is not really clean, but more a hacky solution. Another idea I toyed with was to use not only the last To be really sure, another layer could be added to query each known element if it has another Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I.e this is a workaround for something web already could and should handle?
As such, it seems a bit over-engineered at first sight. There are other options:
- Write milliseconds where already
alloweddesired (Don't cut off milliseconds from current-time-in-milliseconds icinga-notifications-web#306) - Write increasing values (Ensure new/updated rows having a changed_at greater than all previous ones icinga-notifications-web#311)
- If we decide to workaround this, here is something less complex: incrementalFetch(): fix race condition which would miss rows based on changed_at #288
But ideally I'd like web to handle this. I've already given them all instruments for that.
Reopened because I have no idea what's going on here, especially given there is now another PR over in the web project that wants to revert the PR that was used to close this PR. |
As changes might not be committed in the database in a continuous linear fashions, elements out of order might get ignored. This change adds a window to the past for incrementalFetch, honoring older elements. The incrementalApplyPending function now compares the changed_at value for known elements, skipping those without a change.