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 ccb592c1dc9 [fix](index compaction) Only do index compaction for
dup_keys and unique_keys with mow enabled (#31136)
ccb592c1dc9 is described below
commit ccb592c1dc95180aa5fdd518f23020b5b01ff131
Author: qiye <[email protected]>
AuthorDate: Tue Feb 20 20:05:26 2024 +0800
[fix](index compaction) Only do index compaction for dup_keys and
unique_keys with mow enabled (#31136)
---
be/src/olap/compaction.cpp | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/be/src/olap/compaction.cpp b/be/src/olap/compaction.cpp
index a686bbbf61e..4b6bef0c8e4 100644
--- a/be/src/olap/compaction.cpp
+++ b/be/src/olap/compaction.cpp
@@ -402,9 +402,7 @@ Status Compaction::do_compaction_impl(int64_t permits) {
RETURN_IF_ERROR(check_correctness(stats));
if (_input_row_num > 0 && stats.rowid_conversion &&
config::inverted_index_compaction_enable &&
- !ctx.skip_inverted_index.empty() &&
- (!(_tablet->keys_type() == KeysType::UNIQUE_KEYS &&
- !_tablet->enable_unique_key_merge_on_write()))) {
+ !ctx.skip_inverted_index.empty()) {
OlapStopWatch inverted_watch;
// check rowid_conversion correctness
@@ -604,8 +602,10 @@ Status
Compaction::construct_output_rowset_writer(RowsetWriterContext& ctx, bool
ctx.tablet_schema = _cur_tablet_schema;
ctx.newest_write_timestamp = _newest_write_timestamp;
ctx.write_type = DataWriteType::TYPE_COMPACTION;
+ // only do index compaction for dup_keys and unique_keys with mow enabled
if (config::inverted_index_compaction_enable &&
- ((_tablet->keys_type() == KeysType::UNIQUE_KEYS ||
+ (((_tablet->keys_type() == KeysType::UNIQUE_KEYS &&
+ _tablet->enable_unique_key_merge_on_write()) ||
_tablet->keys_type() == KeysType::DUP_KEYS))) {
for (const auto& index : _cur_tablet_schema->indexes()) {
if (index.index_type() == IndexType::INVERTED) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]