diff --git a/be/src/olap/compaction.cpp b/be/src/olap/compaction.cpp index 9109c59e8c235e..d9ca73b88a1bfd 100644 --- a/be/src/olap/compaction.cpp +++ b/be/src/olap/compaction.cpp @@ -686,9 +686,9 @@ Status Compaction::do_inverted_index_compaction() { << st; return st; } - for (const auto& writer : inverted_index_file_writers) { - writer->set_file_writer_opts(ctx.get_file_writer_options()); - } + } + for (const auto& writer : inverted_index_file_writers) { + writer->set_file_writer_opts(ctx.get_file_writer_options()); } // use tmp file dir to store index files diff --git a/regression-test/suites/inverted_index_p0/index_compaction/test_index_compaction_dup_keys.groovy b/regression-test/suites/inverted_index_p0/index_compaction/test_index_compaction_dup_keys.groovy index 3e1cbc6b6e2a29..b181ede9eb6b98 100644 --- a/regression-test/suites/inverted_index_p0/index_compaction/test_index_compaction_dup_keys.groovy +++ b/regression-test/suites/inverted_index_p0/index_compaction/test_index_compaction_dup_keys.groovy @@ -24,6 +24,7 @@ suite("test_index_compaction_dup_keys", "nonConcurrent") { def backendId_to_backendHttpPort = [:] getBackendIpHttpPort(backendId_to_backendIP, backendId_to_backendHttpPort); + sql """ set global enable_match_without_inverted_index = false """ boolean disableAutoCompaction = false def set_be_config = { key, value -> @@ -239,5 +240,6 @@ suite("test_index_compaction_dup_keys", "nonConcurrent") { if (has_update_be_config) { set_be_config.call("inverted_index_compaction_enable", invertedIndexCompactionEnable.toString()) } + sql """ set global enable_match_without_inverted_index = true """ } } diff --git a/regression-test/suites/inverted_index_p0/index_compaction/test_index_compaction_null.groovy b/regression-test/suites/inverted_index_p0/index_compaction/test_index_compaction_null.groovy index 2a0647ecb63038..e9b4294c4df354 100644 --- a/regression-test/suites/inverted_index_p0/index_compaction/test_index_compaction_null.groovy +++ b/regression-test/suites/inverted_index_p0/index_compaction/test_index_compaction_null.groovy @@ -24,6 +24,7 @@ suite("test_index_compaction_null", "nonConcurrent") { def backendId_to_backendHttpPort = [:] getBackendIpHttpPort(backendId_to_backendIP, backendId_to_backendHttpPort); + sql """ set global enable_match_without_inverted_index = false """ boolean disableAutoCompaction = false def set_be_config = { key, value -> @@ -316,5 +317,7 @@ suite("test_index_compaction_null", "nonConcurrent") { if (has_update_be_config) { set_be_config.call("inverted_index_compaction_enable", invertedIndexCompactionEnable.toString()) } + + sql """ set global enable_match_without_inverted_index = true """ } } diff --git a/regression-test/suites/inverted_index_p0/index_compaction/test_index_compaction_unique_keys.groovy b/regression-test/suites/inverted_index_p0/index_compaction/test_index_compaction_unique_keys.groovy index 9d5f3b4cef6256..1854be6d674ac3 100644 --- a/regression-test/suites/inverted_index_p0/index_compaction/test_index_compaction_unique_keys.groovy +++ b/regression-test/suites/inverted_index_p0/index_compaction/test_index_compaction_unique_keys.groovy @@ -24,6 +24,7 @@ suite("test_index_compaction_unique_keys", "nonConcurrent") { def backendId_to_backendHttpPort = [:] getBackendIpHttpPort(backendId_to_backendIP, backendId_to_backendHttpPort); + sql """ set global enable_match_without_inverted_index = false """ boolean disableAutoCompaction = false def set_be_config = { key, value -> @@ -245,5 +246,6 @@ suite("test_index_compaction_unique_keys", "nonConcurrent") { if (has_update_be_config) { set_be_config.call("inverted_index_compaction_enable", invertedIndexCompactionEnable.toString()) } + sql """ set global enable_match_without_inverted_index = true """ } } diff --git a/regression-test/suites/inverted_index_p0/index_compaction/test_index_compaction_with_multi_index_segments.groovy b/regression-test/suites/inverted_index_p0/index_compaction/test_index_compaction_with_multi_index_segments.groovy index 55dfcbfb934601..a052355f00127e 100644 --- a/regression-test/suites/inverted_index_p0/index_compaction/test_index_compaction_with_multi_index_segments.groovy +++ b/regression-test/suites/inverted_index_p0/index_compaction/test_index_compaction_with_multi_index_segments.groovy @@ -24,6 +24,7 @@ suite("test_index_compaction_with_multi_index_segments", "nonConcurrent") { def backendId_to_backendHttpPort = [:] getBackendIpHttpPort(backendId_to_backendIP, backendId_to_backendHttpPort); + sql """ set global enable_match_without_inverted_index = false """ boolean disableAutoCompaction = false def set_be_config = { key, value -> @@ -400,5 +401,6 @@ suite("test_index_compaction_with_multi_index_segments", "nonConcurrent") { set_be_config.call("inverted_index_compaction_enable", invertedIndexCompactionEnable.toString()) set_be_config.call("inverted_index_max_buffered_docs", invertedIndexMaxBufferedDocs.toString()) } + sql """ set global enable_match_without_inverted_index = true """ } }