-
Notifications
You must be signed in to change notification settings - Fork 613
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
feat(storage): wait committed epoch when update vnode bitmap #20492
Conversation
❌ Rebase test pr failed: Error: Pull request #20492 is not created by gru-agent[bot] |
This stack of pull requests is managed by Graphite. Learn more about stacking. |
❌ Rebase test pr failed: Error: Pull request #20492 is not created by gru-agent[bot] |
ee10be7
to
079b77c
Compare
e8a7949
to
832be59
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
return; | ||
} | ||
} | ||
yield_now().await; |
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.
Had the code here ever caused meta CPU busy looping in some corner cases? Should we add an exponential backoff?
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.
The in-mem state store is used mostly for test and reference purpose. So no strong requirement for performance.
Here we assume that the all vnodes are properly assigned, so the for loop is expected to finish in short time as long as we yield the future execution here to let other parallelisms to be driven.
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.
Perfect. I forgot this is for the memory state store.
let prev_epoch = epoch.curr; | ||
epoch.prev = prev_epoch; | ||
epoch.curr = next_epoch; |
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.
The names of the epochs look confusing here. Let's rename it later.
{ | ||
assert!(prev_epoch > prev_latest_sealed_epoch); | ||
} | ||
} |
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.
Would this part of logic affect other callers?
832be59
to
5bcc36c
Compare
I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
Part of #18312
In this PR, on
update_vnode_bitmap
ofLocalStateStore
, we will explicitly wait for the previous epoch to be committed, so that afterupdate_vnode_bitmap
returns, the local state store is ready to be read, and doesn't depend on correctly callingtry_wait_epoch
outside of it.Checklist
Documentation
Release note