This is an automated email from the ASF dual-hosted git repository.
kxiao pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.0 by this push:
new 7a061c59281 [Fix](table property) Fix table property
disable_auto_compaction #27853 (#28466)
7a061c59281 is described below
commit 7a061c5928189569d17980855f1697326582ba40
Author: bobhan1 <[email protected]>
AuthorDate: Sat Dec 16 19:39:20 2023 +0800
[Fix](table property) Fix table property disable_auto_compaction #27853
(#28466)
---
be/src/agent/task_worker_pool.cpp | 14 ++++++++------
be/src/olap/delta_writer.cpp | 1 +
2 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/be/src/agent/task_worker_pool.cpp
b/be/src/agent/task_worker_pool.cpp
index d8c4eb351cf..86ee162bad9 100644
--- a/be/src/agent/task_worker_pool.cpp
+++ b/be/src/agent/task_worker_pool.cpp
@@ -1594,12 +1594,14 @@ void
PublishVersionTaskPool::_publish_version_worker_thread_callback() {
TabletSharedPtr tablet =
StorageEngine::instance()->tablet_manager()->get_tablet(tablet_id);
if (tablet != nullptr) {
- tablet->publised_count++;
- if (tablet->publised_count % 10 == 0) {
- StorageEngine::instance()->submit_compaction_task(
- tablet,
CompactionType::CUMULATIVE_COMPACTION, true);
- LOG(INFO) << "trigger compaction succ, tablet_id:"
<< tablet_id
- << ", publised:" <<
tablet->publised_count;
+ if
(!tablet->tablet_meta()->tablet_schema()->disable_auto_compaction()) {
+ tablet->publised_count++;
+ if (tablet->publised_count % 10 == 0) {
+
StorageEngine::instance()->submit_compaction_task(
+ tablet,
CompactionType::CUMULATIVE_COMPACTION, true);
+ LOG(INFO) << "trigger compaction succ,
tablet_id:" << tablet_id
+ << ", publised:" <<
tablet->publised_count;
+ }
}
} else {
LOG(WARNING) << "trigger compaction failed,
tablet_id:" << tablet_id;
diff --git a/be/src/olap/delta_writer.cpp b/be/src/olap/delta_writer.cpp
index 868fb4dc040..e3069947000 100644
--- a/be/src/olap/delta_writer.cpp
+++ b/be/src/olap/delta_writer.cpp
@@ -179,6 +179,7 @@ Status DeltaWriter::init() {
// check tablet version number
if (!config::disable_auto_compaction &&
+ !_tablet->tablet_meta()->tablet_schema()->disable_auto_compaction() &&
_tablet->exceed_version_limit(config::max_tablet_version_num - 100) &&
!MemInfo::is_exceed_soft_mem_limit(GB_EXCHANGE_BYTE)) {
//trigger compaction
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]