Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 3.9k
[Feature](merge-on-write)Support ignore mode for merge-on-write uniqu…#27365
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
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
f5475eac5b8139d2e2ce47759ca4680d47dFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -916,6 +916,11 @@ void DeleteBitmap::add(const BitmapKey& bmk, uint32_t row_id) { | ||||||||||
| delete_bitmap[bmk].add(row_id); | ||||||||||
| } | ||||||||||
| void DeleteBitmap::add_ignore(const BitmapKey& bmk) { | ||||||||||
| std::lock_guard l(lock); | ||||||||||
| delete_bitmap_ignore.insert(bmk); | ||||||||||
| } | ||||||||||
| int DeleteBitmap::remove(const BitmapKey& bmk, uint32_t row_id) { | ||||||||||
| std::lock_guard l(lock); | ||||||||||
| auto it = delete_bitmap.find(bmk); | ||||||||||
| @@ -1001,6 +1006,23 @@ void DeleteBitmap::subset(const BitmapKey& start, const BitmapKey& end, | ||||||||||
| } | ||||||||||
| } | ||||||||||
| void DeleteBitmap::subset_ignore(const BitmapKey& start, const BitmapKey& end, | ||||||||||
| DeleteBitmap* subset_rowset_map) const { | ||||||||||
Comment on lines
+1009
to
+1010
Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. warning: method 'subset_ignore' can be made static [readability-convert-member-functions-to-static]
Suggested change
| ||||||||||
| roaring::Roaring roaring; | ||||||||||
| DCHECK(start < end); | ||||||||||
| std::shared_lock l(lock); | ||||||||||
| for (auto it = delete_bitmap.lower_bound(start); it != delete_bitmap.end(); ++it) { | ||||||||||
| auto& [k, bm] = *it; | ||||||||||
| if (k >= end) { | ||||||||||
| break; | ||||||||||
| } | ||||||||||
| if (delete_bitmap_ignore.find(k) == delete_bitmap_ignore.end()) { | ||||||||||
| break; | ||||||||||
| } | ||||||||||
| subset_rowset_map->set(k, bm); | ||||||||||
| } | ||||||||||
| } | ||||||||||
| void DeleteBitmap::merge(const BitmapKey& bmk, const roaring::Roaring& segment_delete_bitmap) { | ||||||||||
| std::lock_guard l(lock); | ||||||||||
| auto [iter, succ] = delete_bitmap.emplace(bmk, segment_delete_bitmap); | ||||||||||
Uh oh!
There was an error while loading. Please reload this page.
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.
It can't resolve the compaction issue, since the compaction use merge-on-read process to dedup keys, it can't identify which keys should be ignored.