This is an automated email from the ASF dual-hosted git repository.

jianliangqi 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 ee3be4fa769 [fix](index compaction)Fix core when having multiple dest 
segments (#40254)
ee3be4fa769 is described below

commit ee3be4fa769c537966885651a29748558452c9ab
Author: qiye <[email protected]>
AuthorDate: Tue Sep 3 10:35:08 2024 +0800

    [fix](index compaction)Fix core when having multiple dest segments (#40254)
    
    introduced by: #39076
---
 be/src/olap/compaction.cpp                                          | 6 +++---
 .../index_compaction/test_index_compaction_dup_keys.groovy          | 2 ++
 .../index_compaction/test_index_compaction_null.groovy              | 3 +++
 .../index_compaction/test_index_compaction_unique_keys.groovy       | 2 ++
 .../test_index_compaction_with_multi_index_segments.groovy          | 2 ++
 5 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/be/src/olap/compaction.cpp b/be/src/olap/compaction.cpp
index 1fed2253b69..963b885a26b 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 1de813a310b..ce6a7e7c6a3 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 ->
@@ -240,5 +241,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 8a77c2dbf7d..f882cda1522 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 ->
@@ -317,5 +318,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 5afd6bada19..87996687b93 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 ->
@@ -246,5 +247,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 e9cc3300212..edcf41db13c 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 ->
@@ -401,5 +402,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 """
     }
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to