This is an automated email from the ASF dual-hosted git repository. dataroaring pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push: new 7d7528c9727 [fix](compaction) Add read lock for compaction score calculation (#51387) 7d7528c9727 is described below commit 7d7528c97272b9b954a48b08ea73096e3f2ec4ce Author: Siyang Tang <tangsiy...@selectdb.com> AuthorDate: Sun Jun 1 09:14:35 2025 +0800 [fix](compaction) Add read lock for compaction score calculation (#51387) --- be/src/olap/base_tablet.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/be/src/olap/base_tablet.cpp b/be/src/olap/base_tablet.cpp index e050d639487..2a422ff6091 100644 --- a/be/src/olap/base_tablet.cpp +++ b/be/src/olap/base_tablet.cpp @@ -24,6 +24,7 @@ #include <cstdint> #include <iterator> #include <random> +#include <shared_mutex> #include "cloud/cloud_tablet.h" #include "cloud/config.h" @@ -199,6 +200,7 @@ Status BaseTablet::update_by_least_common_schema(const TabletSchemaSPtr& update_ } uint32_t BaseTablet::get_real_compaction_score() const { + std::shared_lock l(_meta_lock); const auto& rs_metas = _tablet_meta->all_rs_metas(); return std::accumulate(rs_metas.begin(), rs_metas.end(), 0, [](uint32_t score, const RowsetMetaSharedPtr& rs_meta) { --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org