This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch branch-4.0
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-4.0 by this push:
new 18c2f7358dc branch-4.0: [fix](storage-engine)
_clean_unused_rowset_metas should skip rowsets in _unused_rowsets map #59390
(#59418)
18c2f7358dc is described below
commit 18c2f7358dcd388b749484eeb5879529f4f28b95
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Mon Dec 29 10:16:34 2025 +0800
branch-4.0: [fix](storage-engine) _clean_unused_rowset_metas should skip
rowsets in _unused_rowsets map #59390 (#59418)
Cherry-picked from #59390
Co-authored-by: meiyi <[email protected]>
---
be/src/olap/storage_engine.cpp | 3 ++-
be/src/olap/tablet.cpp | 6 ++++--
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/be/src/olap/storage_engine.cpp b/be/src/olap/storage_engine.cpp
index 271742c49f8..8c80b79fdd8 100644
--- a/be/src/olap/storage_engine.cpp
+++ b/be/src/olap/storage_engine.cpp
@@ -957,7 +957,8 @@ void StorageEngine::_clean_unused_rowset_metas() {
return true;
}
if (rowset_meta->rowset_state() == RowsetStatePB::VISIBLE &&
- (!tablet->rowset_meta_is_useful(rowset_meta))) {
+ (!tablet->rowset_meta_is_useful(rowset_meta)) &&
+ !check_rowset_id_in_unused_rowsets(rowset_id)) {
LOG(INFO) << "rowset meta is not used any more, remove it.
rowset_id="
<< rowset_meta->rowset_id();
invalid_rowset_metas.push_back(rowset_meta);
diff --git a/be/src/olap/tablet.cpp b/be/src/olap/tablet.cpp
index 20f275ea7d4..3f1b5d70f06 100644
--- a/be/src/olap/tablet.cpp
+++ b/be/src/olap/tablet.cpp
@@ -920,8 +920,10 @@ void Tablet::delete_expired_stale_rowset() {
if (config::enable_mow_verbose_log) {
LOG_INFO("finish delete_expired_stale_rowset for tablet={}",
tablet_id());
}
-
DBUG_EXECUTE_IF("Tablet.delete_expired_stale_rowset.start_delete_unused_rowset",
- { _engine.start_delete_unused_rowset(); });
+
DBUG_EXECUTE_IF("Tablet.delete_expired_stale_rowset.start_delete_unused_rowset",
{
+ _engine.start_delete_unused_rowset();
+ [[maybe_unused]] auto st = _engine.start_trash_sweep(nullptr);
+ });
}
Status Tablet::check_version_integrity(const Version& version, bool quiet) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]