-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
wtclient: handle un-acked updates for exhausted sessions #8233
wtclient: handle un-acked updates for exhausted sessions #8233
Conversation
5b40fdb
to
376a7cf
Compare
376a7cf
to
844a0c1
Compare
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.
LGTM, super clean and readable change! Very very nice! ✨
844a0c1
to
cc224a1
Compare
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.
Nice find and fix 🚀. I only have a question regarding the CountCommittedUpdates bool
This commit adds a test to demonstrate an edge case that can result in the "tower has un-acked updates" error being thrown when a user is attempting to remove a tower. This will be fixed in an upcoming commit.
cc224a1
to
64d319a
Compare
@bhandras - gonna re-request since i've updated as per @bitromortac's comment about not needing the boolean option 🙏 |
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.
LGTM ⚡, very nice!
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.
PR after minor cleanup still LGTM 🌊
In this commit, we adjust the PostEvaluateFilterFn to also take in a count representing the number of committed updates (ie, persisted un-acked updates) that the session has. This will be made use of in an upcoming commit.
In this commit, we use the newly added session listing options to ensure that we only see a session as exhausted if it does not have any un-acked updates on disk. This fixes the bug previously demonstrated.
64d319a
to
b14b30f
Compare
This PR addresses an edge case that could lead to the "tower has un-acked updates" error
when a user tries to remove a tower. See the issue here.
The Issue:
Currently, if you call "remove tower", then only sessions from that tower that are loaded into memory on
startup are terminated correctly. And we only load in sessions where
session.SeqNum < session.policy.MaxUpdates
.So the issue occurs when the session is technically exhausted but there is still an un-acked update on disk.
This means that we would not terminate such a session properly on tower removal and so would run into "tower has un-acked updates".
The Solution:
So with this PR, we make sure to load a session into memory if there are still un-acked updates that it needs to deal with.
Flow of the PR: