Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Yukang-Lian committed Jul 10, 2023
1 parent f696588 commit 12ea5c4
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion be/src/olap/tablet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3268,7 +3268,7 @@ Status Tablet::full_compaction_update_delete_bitmap(const RowsetSharedPtr& rowse
for (const auto& it : _rs_version_map) {
const int64_t& cur_version = it.first.first;
const RowsetSharedPtr& published_rowset = it.second;
delete_bitmap.reset();
delete_bitmap->clear();
if (cur_version > rowset->version().second) {
LOG(INFO) << "[Full compaction published rowsets]"
<< "[" << it.first.first << "-" << it.first.second << "]";
Expand Down
6 changes: 6 additions & 0 deletions be/src/olap/tablet_meta.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include <json2pb/pb_to_json.h>
#include <time.h>

#include <mutex>
#include <set>
#include <utility>

Expand Down Expand Up @@ -931,6 +932,11 @@ void DeleteBitmap::remove(const BitmapKey& start, const BitmapKey& end) {
}
}

void DeleteBitmap::clear() {
std::lock_guard l(lock);
delete_bitmap.clear();
}

bool DeleteBitmap::contains(const BitmapKey& bmk, uint32_t row_id) const {
std::shared_lock l(lock);
auto it = delete_bitmap.find(bmk);
Expand Down
5 changes: 5 additions & 0 deletions be/src/olap/tablet_meta.h
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,11 @@ class DeleteBitmap {
*/
void remove(const BitmapKey& lower_key, const BitmapKey& upper_key);

/**
* Clears all bitmaps
*/
void clear();

/**
* Checks if the given row is marked deleted
*
Expand Down

0 comments on commit 12ea5c4

Please sign in to comment.