-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
storage: use FIFO order in queues on equal priorities #32053
Conversation
This is a refactor without functional changes, in preparation for adding a sequence number generator into the priority queue. Release note: None
When priorities are equal, the priority queue naively performs close to LIFO which is not what we want as it allows starvation of items backed into the queue. This poses a big problem for the Raft snapshot queue when put under pressure. See cockroachdb#31947 (comment). Release note (bug fix): Avoid a stall in the processing of Raft snapshots when many snapshots are requested at the same time.
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.
Looks exactly like what I was imagining.
Reviewed 2 of 2 files at r1.
Reviewable status:complete! 0 of 0 LGTMs obtained (and 1 stale)
bors r=petermattis |
32053: storage: use FIFO order in queues on equal priorities r=petermattis a=tschottdorf When priorities are equal, the priority queue naively performs close to LIFO which is not what we want as it allows starvation of items backed into the queue. This poses a big problem for the Raft snapshot queue when put under pressure. See #31947 (comment). Release note (bug fix): Avoid a stall in the processing of Raft snapshots when many snapshots are requested at the same time. Co-authored-by: Tobias Schottdorf <tobias.schottdorf@gmail.com>
We need to get to the bottom of what is causing the snapshot generation. |
Build succeeded |
Which I'm sure you're already doing. |
One failed run at a time. |
When priorities are equal, the priority queue naively performs close to
LIFO which is not what we want as it allows starvation of items backed into
the queue. This poses a big problem for the Raft snapshot queue when put
under pressure.
See
#31947 (comment).
Release note (bug fix): Avoid a stall in the processing of Raft snapshots
when many snapshots are requested at the same time.