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 4ed03304336 [fix](test)Fix index_compaction unstable cases (#29499) 
(#29603)
4ed03304336 is described below

commit 4ed033043366fddd9811884ec8f270a2790c31b3
Author: qiye <[email protected]>
AuthorDate: Mon Jan 8 23:43:43 2024 +0800

    [fix](test)Fix index_compaction unstable cases (#29499) (#29603)
---
 .../index_compaction/test_index_compaction_dup_keys.groovy  | 13 ++++++-------
 .../test_index_compaction_unique_keys.groovy                | 11 +++++------
 .../test_index_compaction_with_multi_index_segments.groovy  | 13 ++++++-------
 3 files changed, 17 insertions(+), 20 deletions(-)

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 e555d85456c..cd98f58ce4f 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
@@ -35,9 +35,9 @@ suite("test_index_compaction_dup_keys", "p0") {
     def trigger_full_compaction_on_tablets = { String[][] tablets ->
         for (String[] tablet : tablets) {
             String tablet_id = tablet[0]
-            backend_id = tablet[2]
-            times = 1
-            
+            String backend_id = tablet[2]
+            int times = 1
+
             String compactionStatus;
             do{
                 def (code, out, err) = 
be_run_full_compaction(backendId_to_backendIP.get(backend_id), 
backendId_to_backendHttpPort.get(backend_id), tablet_id)
@@ -64,8 +64,8 @@ suite("test_index_compaction_dup_keys", "p0") {
             do {
                 Thread.sleep(1000)
                 String tablet_id = tablet[0]
-                backend_id = tablet[2]
-                (code, out, err) = 
be_get_compaction_status(backendId_to_backendIP.get(backend_id), 
backendId_to_backendHttpPort.get(backend_id), tablet_id)
+                String backend_id = tablet[2]
+                def (code, out, err) = 
be_get_compaction_status(backendId_to_backendIP.get(backend_id), 
backendId_to_backendHttpPort.get(backend_id), tablet_id)
                 logger.info("Get compaction status: code=" + code + ", out=" + 
out + ", err=" + err)
                 assertEquals(code, 0)
                 def compactionStatus = parseJson(out.trim())
@@ -78,9 +78,8 @@ suite("test_index_compaction_dup_keys", "p0") {
     def get_rowset_count = {String[][] tablets ->
         int rowsetCount = 0
         for (String[] tablet in tablets) {
-            String tablet_id = tablet[0]
             def compactionStatusUrlIndex = 18
-            (code, out, err) = curl("GET", tablet[compactionStatusUrlIndex])
+            def (code, out, err) = curl("GET", 
tablet[compactionStatusUrlIndex])
             logger.info("Show tablets status: code=" + code + ", out=" + out + 
", err=" + err)
             assertEquals(code, 0)
             def tabletJson = parseJson(out.trim())
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 b05059e9172..f4f2afb78d6 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
@@ -35,8 +35,8 @@ suite("test_index_compaction_unique_keys", "p0") {
     def trigger_full_compaction_on_tablets = { String[][] tablets ->
         for (String[] tablet : tablets) {
             String tablet_id = tablet[0]
-            backend_id = tablet[2]
-            times = 1
+            String backend_id = tablet[2]
+            int times = 1
             
             String compactionStatus;
             do{
@@ -64,8 +64,8 @@ suite("test_index_compaction_unique_keys", "p0") {
             do {
                 Thread.sleep(1000)
                 String tablet_id = tablet[0]
-                backend_id = tablet[2]
-                (code, out, err) = 
be_get_compaction_status(backendId_to_backendIP.get(backend_id), 
backendId_to_backendHttpPort.get(backend_id), tablet_id)
+                String backend_id = tablet[2]
+                def (code, out, err) = 
be_get_compaction_status(backendId_to_backendIP.get(backend_id), 
backendId_to_backendHttpPort.get(backend_id), tablet_id)
                 logger.info("Get compaction status: code=" + code + ", out=" + 
out + ", err=" + err)
                 assertEquals(code, 0)
                 def compactionStatus = parseJson(out.trim())
@@ -78,9 +78,8 @@ suite("test_index_compaction_unique_keys", "p0") {
     def get_rowset_count = {String[][] tablets ->
         int rowsetCount = 0
         for (String[] tablet in tablets) {
-            String tablet_id = tablet[0]
             def compactionStatusUrlIndex = 18
-            (code, out, err) = curl("GET", tablet[compactionStatusUrlIndex])
+            def (code, out, err) = curl("GET", 
tablet[compactionStatusUrlIndex])
             logger.info("Show tablets status: code=" + code + ", out=" + out + 
", err=" + err)
             assertEquals(code, 0)
             def tabletJson = parseJson(out.trim())
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 af92e5c4657..87b3cc06fbc 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,7 +24,7 @@ suite("test_index_compaction_with_multi_index_segments", 
"p0") {
     getBackendIpHttpPort(backendId_to_backendIP, backendId_to_backendHttpPort);
 
     boolean disableAutoCompaction = false
-
+  
     def set_be_config = { key, value ->
         for (String backend_id: backendId_to_backendIP.keySet()) {
             def (code, out, err) = 
update_be_config(backendId_to_backendIP.get(backend_id), 
backendId_to_backendHttpPort.get(backend_id), key, value)
@@ -35,8 +35,8 @@ suite("test_index_compaction_with_multi_index_segments", 
"p0") {
     def trigger_full_compaction_on_tablets = { String[][] tablets ->
         for (String[] tablet : tablets) {
             String tablet_id = tablet[0]
-            backend_id = tablet[2]
-            times = 1
+            String backend_id = tablet[2]
+            int times = 1
 
             String compactionStatus;
             do{
@@ -64,8 +64,8 @@ suite("test_index_compaction_with_multi_index_segments", 
"p0") {
             do {
                 Thread.sleep(1000)
                 String tablet_id = tablet[0]
-                backend_id = tablet[2]
-                (code, out, err) = 
be_get_compaction_status(backendId_to_backendIP.get(backend_id), 
backendId_to_backendHttpPort.get(backend_id), tablet_id)
+                String backend_id = tablet[2]
+                def (code, out, err) = 
be_get_compaction_status(backendId_to_backendIP.get(backend_id), 
backendId_to_backendHttpPort.get(backend_id), tablet_id)
                 logger.info("Get compaction status: code=" + code + ", out=" + 
out + ", err=" + err)
                 assertEquals(code, 0)
                 def compactionStatus = parseJson(out.trim())
@@ -78,9 +78,8 @@ suite("test_index_compaction_with_multi_index_segments", 
"p0") {
     def get_rowset_count = {String[][] tablets ->
         int rowsetCount = 0
         for (String[] tablet in tablets) {
-            String tablet_id = tablet[0]
             def compactionStatusUrlIndex = 18
-            (code, out, err) = curl("GET", tablet[compactionStatusUrlIndex])
+            def (code, out, err) = curl("GET", 
tablet[compactionStatusUrlIndex])
             logger.info("Show tablets status: code=" + code + ", out=" + out + 
", err=" + err)
             assertEquals(code, 0)
             def tabletJson = parseJson(out.trim())


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

Reply via email to