Skip to content

Commit 0d71edb

Browse files
committed
branch-3.0: [fix](mow) remove delete bitmap when remove unused rowsets (apache#50973)
1 parent d499904 commit 0d71edb

18 files changed

+1043
-223
lines changed

be/src/cloud/cloud_cumulative_compaction.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,10 @@ Status CloudCumulativeCompaction::process_old_version_delete_bitmap() {
447447
{ static_cast<CloudTablet*>(_tablet.get())->delete_expired_stale_rowsets(); });
448448
}
449449
}
450+
DBUG_EXECUTE_IF("CumulativeCompaction.modify_rowsets.delete_expired_stale_rowset", {
451+
LOG(INFO) << "delete_expired_stale_rowsets for tablet=" << _tablet->tablet_id();
452+
_engine.tablet_mgr().vacuum_stale_rowsets(CountDownLatch(1));
453+
});
450454
return Status::OK();
451455
}
452456

be/src/cloud/cloud_delete_bitmap_action.cpp

Lines changed: 0 additions & 182 deletions
This file was deleted.

be/src/cloud/cloud_tablet.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -493,18 +493,16 @@ void CloudTablet::remove_unused_rowsets() {
493493
++it;
494494
continue;
495495
}
496+
tablet_meta()->remove_rowset_delete_bitmap(rs->rowset_id(), rs->version());
496497
rs->clear_cache();
497498
it = _unused_rowsets.erase(it);
498499
g_unused_rowsets_count << -1;
499500
removed_rowsets_num++;
500501
}
501502

502-
if (removed_rowsets_num > 0) {
503-
LOG(INFO) << "tablet_id=" << tablet_id()
504-
<< ", unused_rowset size=" << _unused_rowsets.size()
505-
<< ", removed_rowsets_num=" << removed_rowsets_num
506-
<< ", cost(us)=" << watch.get_elapse_time_us();
507-
}
503+
LOG(INFO) << "tablet_id=" << tablet_id() << ", unused_rowset size=" << _unused_rowsets.size()
504+
<< ", removed_rowsets_num=" << removed_rowsets_num
505+
<< ", cost(us)=" << watch.get_elapse_time_us();
508506
}
509507

510508
void CloudTablet::update_base_size(const Rowset& rs) {

0 commit comments

Comments
 (0)