You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by yi...@apache.org on 2022/09/19 00:39:34 UTC
[doris] branch master updated: [enhancement](compaction) prevent quick_compaction&auto_compaction conflict (#12674)
This is an automated email from the ASF dual-hosted git repository.
yiguolei 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 65cff8d40c [enhancement](compaction) prevent quick_compaction&auto_compaction conflict (#12674)
65cff8d40c is described below
commit 65cff8d40c1f22d662b19c9a8218ee5ec0aef7df
Author: yixiutt <10...@users.noreply.github.com>
AuthorDate: Mon Sep 19 08:39:27 2022 +0800
[enhancement](compaction) prevent quick_compaction&auto_compaction conflict (#12674)
Co-authored-by: yixiutt <yi...@selectdb.com>
---
be/src/olap/olap_server.cpp | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/be/src/olap/olap_server.cpp b/be/src/olap/olap_server.cpp
index d35ec4d712..e86f88dcb1 100644
--- a/be/src/olap/olap_server.cpp
+++ b/be/src/olap/olap_server.cpp
@@ -683,10 +683,18 @@ Status StorageEngine::submit_compaction_task(TabletSharedPtr tablet,
Status StorageEngine::_handle_quick_compaction(TabletSharedPtr tablet) {
CumulativeCompaction compact(tablet);
compact.quick_rowsets_compact();
+ _pop_tablet_from_submitted_compaction(tablet, CompactionType::CUMULATIVE_COMPACTION);
return Status::OK();
}
Status StorageEngine::submit_quick_compaction_task(TabletSharedPtr tablet) {
+ bool already_exist =
+ _push_tablet_into_submitted_compaction(tablet, CompactionType::CUMULATIVE_COMPACTION);
+ if (already_exist) {
+ return Status::AlreadyExist(
+ "compaction task has already been submitted, tablet_id={}, compaction_type={}.",
+ tablet->tablet_id(), CompactionType::CUMULATIVE_COMPACTION);
+ }
_quick_compaction_thread_pool->submit_func(
std::bind<void>(&StorageEngine::_handle_quick_compaction, this, tablet));
return Status::OK();
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org