-
Notifications
You must be signed in to change notification settings - Fork 590
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): avoid uploader depending on seal_epoch #16985
Conversation
/// Poll the success of the oldest spilled task of unsealed data. Return `Poll::Ready(None)` if | ||
/// there is no spilling task. | ||
fn poll_unsealed_spill_task( | ||
&mut self, | ||
cx: &mut Context<'_>, | ||
) -> Poll<Option<StagingSstableInfo>> { | ||
// iterator from older epoch to new epoch so that the spill task are finished in epoch order | ||
for unsealed_data in self.unsealed_data.values_mut() { | ||
for unsealed_data in self.unsync_data.epoch_data.values_mut() { |
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 think the term unseal/sealed/sync are used with different meanings in different parts of the codes after this PR. For example, sealed data in LocalInstanceUnsyncData
is considered unsealed in the context of HummockUploader
. Can we make it less confusing by having a clear definition of sync and sealed? Some ideas:
unsealed
: per instance concept. Data is unsealed beforelocal_seal_epoch
sealed
: per instance concept. Data is sealed afterlocal_seal_epoch
spill
: per epoch concept. Data is spilled ifmay_spill
triggers.sync
: per epoch conecpt. Data is synced aftersync
.
unsealed
, sealed
and spill
data are all considered unsync
.
Following this ideas, we can:
- rename
poll_unsealed_spill_task
topoll_unsync_spill_task
- remove
SealedData
struct and return the correspondingepoch_data
onunsync_data.sync
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.
Indeed. I have removed the concept of sealed
and unsealed
in global uploader. The concept is only in LocalInstanceUnsyncData
.
be45d98
to
f5e3455
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.
Rest LGTM
I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
Checklist
./risedev check
(or alias,./risedev c
)Documentation
Release note
If this PR includes changes that directly affect users or other significant modifications relevant to the community, kindly draft a release note to provide a concise summary of these changes. Please prioritize highlighting the impact these changes will have on users.