-
Notifications
You must be signed in to change notification settings - Fork 596
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): Splitting table change log from HummockVersion on CN side #20050
base: main
Are you sure you want to change the base?
Conversation
…nto li0k/storage_divide_table_change_log
…nto li0k/storage_divide_table_change_log
guard: Arc::new(PinnedVersionGuard::new( | ||
version_id, | ||
self.guard.pinned_version_manager_tx.clone(), | ||
)), | ||
table_change_log: Arc::new(RwLock::new(t)), | ||
version: Arc::new(LocalHummockVersion::from(version)), |
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 just want to leave a note here.
This LocalHummockVersion::from
is an addtional HummockVersion
conversion introduced by this PR. However I don't think it will have significant performance implications, as it primarily involves move semantics.
let change_log = { | ||
let table_change_logs = version.table_change_log().read(); | ||
if let Some(change_log) = table_change_logs.get(&options.table_id) { | ||
change_log.filter_epoch(epoch_range).cloned().collect_vec() |
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.
This cloned() is an additional cost introduced in this PR.
If multiple iter_log are running simultaneously, will the memory usage be substantial?
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.
cc @wenym1 , suggests that iter_log
is executed less frequently and that this clone is acceptable.
I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
This PR optimize clone behavior on the CN side. Split the table change log from the hummock version to avoid copying all table change logs at each version delta.
Checklist
Documentation
Release note