From f7f58a9a4c1ac49f1696ad7f6c25d5df0f94dfee Mon Sep 17 00:00:00 2001 From: shuke <37901441+shuke987@users.noreply.github.com> Date: Mon, 13 Jul 2026 16:50:13 +0800 Subject: [PATCH] [fix](regression) Disable auto compaction for physical row inspections ### What problem does this PR solve? Issue Number: close #xxx Related PR: #65211, #64508 Problem Summary: Regression cases that bypass the delete bitmap and assert historical physical rows can race with background compaction. Compaction may merge the expected old rowsets before the assertion while the user-visible result remains correct. Disable table-level auto compaction only for cases and table definitions that intentionally inspect those physical versions. ### Release note None ### Check List (For Author) - Test: Regression test - `test_flexible_partial_update_publish_conflict_seq` - Behavior changed: No - Does this need documentation: No --- .../test_partial_update_publish_conflict_seq.groovy | 1 + .../publish/test_auto_inc_replica_consistency.groovy | 1 + .../publish/test_f_seq_publish_read_from_old.groovy | 1 + ...t_fleixble_partial_update_publish_conflict_seq.groovy | 1 + .../flexible/test_f_seq_read_from_old.groovy | 3 ++- .../test_flexible_partial_update_delete_sign.groovy | 9 ++++++++- .../flexible/test_flexible_partial_update_seq_col.groovy | 4 +++- .../test_p_seq_publish_read_from_old.groovy | 1 + .../test_partial_update_seq_read_from_old.groovy | 3 ++- 9 files changed, 20 insertions(+), 4 deletions(-) diff --git a/regression-test/suites/fault_injection_p0/partial_update/test_partial_update_publish_conflict_seq.groovy b/regression-test/suites/fault_injection_p0/partial_update/test_partial_update_publish_conflict_seq.groovy index 8e9d692b35d58e..4aa2d660be7095 100644 --- a/regression-test/suites/fault_injection_p0/partial_update/test_partial_update_publish_conflict_seq.groovy +++ b/regression-test/suites/fault_injection_p0/partial_update/test_partial_update_publish_conflict_seq.groovy @@ -32,6 +32,7 @@ suite("test_partial_update_publish_conflict_seq", "nonConcurrent") { ) UNIQUE KEY(`k`) DISTRIBUTED BY HASH(`k`) BUCKETS 1 PROPERTIES( "replication_num" = "1", + "disable_auto_compaction" = "true", "enable_unique_key_merge_on_write" = "true", "light_schema_change" = "true", "enable_unique_key_skip_bitmap_column" = "true", diff --git a/regression-test/suites/unique_with_mow_p0/flexible/publish/test_auto_inc_replica_consistency.groovy b/regression-test/suites/unique_with_mow_p0/flexible/publish/test_auto_inc_replica_consistency.groovy index fb4f1b10a17cfb..5054c45b99217b 100644 --- a/regression-test/suites/unique_with_mow_p0/flexible/publish/test_auto_inc_replica_consistency.groovy +++ b/regression-test/suites/unique_with_mow_p0/flexible/publish/test_auto_inc_replica_consistency.groovy @@ -36,6 +36,7 @@ suite("test_auto_inc_replica_consistency") { ) UNIQUE KEY(`k`) DISTRIBUTED BY HASH(`k`) BUCKETS 1 PROPERTIES( "replication_num" = "1", + "disable_auto_compaction" = "true", "enable_unique_key_merge_on_write" = "true", "light_schema_change" = "true", "enable_unique_key_skip_bitmap_column" = "true", diff --git a/regression-test/suites/unique_with_mow_p0/flexible/publish/test_f_seq_publish_read_from_old.groovy b/regression-test/suites/unique_with_mow_p0/flexible/publish/test_f_seq_publish_read_from_old.groovy index 0c62427f94bd41..d83bbd42ca09c8 100644 --- a/regression-test/suites/unique_with_mow_p0/flexible/publish/test_f_seq_publish_read_from_old.groovy +++ b/regression-test/suites/unique_with_mow_p0/flexible/publish/test_f_seq_publish_read_from_old.groovy @@ -36,6 +36,7 @@ suite("test_f_seq_publish_read_from_old") { ) UNIQUE KEY(`k`) DISTRIBUTED BY HASH(`k`) BUCKETS 1 PROPERTIES( "replication_num" = "1", + "disable_auto_compaction" = "true", "enable_unique_key_merge_on_write" = "true", "light_schema_change" = "true", "enable_unique_key_skip_bitmap_column" = "true", diff --git a/regression-test/suites/unique_with_mow_p0/flexible/publish/test_fleixble_partial_update_publish_conflict_seq.groovy b/regression-test/suites/unique_with_mow_p0/flexible/publish/test_fleixble_partial_update_publish_conflict_seq.groovy index 7f257a2c336a1b..0f29ad9065424c 100644 --- a/regression-test/suites/unique_with_mow_p0/flexible/publish/test_fleixble_partial_update_publish_conflict_seq.groovy +++ b/regression-test/suites/unique_with_mow_p0/flexible/publish/test_fleixble_partial_update_publish_conflict_seq.groovy @@ -36,6 +36,7 @@ suite("test_flexible_partial_update_publish_conflict_seq") { ) UNIQUE KEY(`k`) DISTRIBUTED BY HASH(`k`) BUCKETS 1 PROPERTIES( "replication_num" = "1", + "disable_auto_compaction" = "true", "enable_unique_key_merge_on_write" = "true", "light_schema_change" = "true", "enable_unique_key_skip_bitmap_column" = "true", diff --git a/regression-test/suites/unique_with_mow_p0/flexible/test_f_seq_read_from_old.groovy b/regression-test/suites/unique_with_mow_p0/flexible/test_f_seq_read_from_old.groovy index 4eed4ada2bd48a..d1cafa5f493e16 100644 --- a/regression-test/suites/unique_with_mow_p0/flexible/test_f_seq_read_from_old.groovy +++ b/regression-test/suites/unique_with_mow_p0/flexible/test_f_seq_read_from_old.groovy @@ -39,6 +39,7 @@ suite('test_f_seq_read_from_old') { ) UNIQUE KEY(`k`) DISTRIBUTED BY HASH(`k`) BUCKETS 1 PROPERTIES( "replication_num" = "1", + "disable_auto_compaction" = "true", "enable_unique_key_merge_on_write" = "true", "light_schema_change" = "true", "enable_unique_key_skip_bitmap_column" = "true", @@ -85,4 +86,4 @@ suite('test_f_seq_read_from_old') { qt_sql3 "select k,v1,v2,v3,v4,v5,__DORIS_SEQUENCE_COL__,__DORIS_DELETE_SIGN__ from ${tableName} order by k;" inspect_rows "select k,v1,v2,v3,v4,v5,__DORIS_SEQUENCE_COL__,__DORIS_DELETE_SIGN__,__DORIS_VERSION_COL__,BITMAP_TO_STRING(__DORIS_SKIP_BITMAP_COL__) from ${tableName} order by k,__DORIS_VERSION_COL__;" } -} \ No newline at end of file +} diff --git a/regression-test/suites/unique_with_mow_p0/flexible/test_flexible_partial_update_delete_sign.groovy b/regression-test/suites/unique_with_mow_p0/flexible/test_flexible_partial_update_delete_sign.groovy index 3fad13d5304985..b4c26493b2c0fe 100644 --- a/regression-test/suites/unique_with_mow_p0/flexible/test_flexible_partial_update_delete_sign.groovy +++ b/regression-test/suites/unique_with_mow_p0/flexible/test_flexible_partial_update_delete_sign.groovy @@ -43,6 +43,7 @@ suite('test_flexible_partial_update_delete_sign') { ) UNIQUE KEY(`k`) DISTRIBUTED BY HASH(`k`) BUCKETS 1 PROPERTIES( "replication_num" = "1", + "disable_auto_compaction" = "true", "enable_unique_key_merge_on_write" = "true", "light_schema_change" = "true", "enable_unique_key_skip_bitmap_column" = "true", @@ -93,6 +94,7 @@ suite('test_flexible_partial_update_delete_sign') { ) UNIQUE KEY(`k`) DISTRIBUTED BY HASH(`k`) BUCKETS 1 PROPERTIES( "replication_num" = "1", + "disable_auto_compaction" = "true", "enable_unique_key_merge_on_write" = "true", "light_schema_change" = "true", "enable_unique_key_skip_bitmap_column" = "true", @@ -130,6 +132,7 @@ suite('test_flexible_partial_update_delete_sign') { ) UNIQUE KEY(`k`) DISTRIBUTED BY HASH(`k`) BUCKETS 1 PROPERTIES( "replication_num" = "1", + "disable_auto_compaction" = "true", "enable_unique_key_merge_on_write" = "true", "light_schema_change" = "true", "enable_unique_key_skip_bitmap_column" = "true", @@ -161,6 +164,7 @@ suite('test_flexible_partial_update_delete_sign') { ) UNIQUE KEY(`k`) DISTRIBUTED BY HASH(`k`) BUCKETS 1 PROPERTIES( "replication_num" = "1", + "disable_auto_compaction" = "true", "enable_unique_key_merge_on_write" = "true", "light_schema_change" = "true", "enable_unique_key_skip_bitmap_column" = "true", @@ -193,6 +197,7 @@ suite('test_flexible_partial_update_delete_sign') { ) UNIQUE KEY(`k`) DISTRIBUTED BY HASH(`k`) BUCKETS 1 PROPERTIES( "replication_num" = "1", + "disable_auto_compaction" = "true", "enable_unique_key_merge_on_write" = "true", "light_schema_change" = "true", "enable_unique_key_skip_bitmap_column" = "true", @@ -264,6 +269,7 @@ suite('test_flexible_partial_update_delete_sign') { ) UNIQUE KEY(`k`) DISTRIBUTED BY HASH(`k`) BUCKETS 1 PROPERTIES( "replication_num" = "1", + "disable_auto_compaction" = "true", "enable_unique_key_merge_on_write" = "true", "light_schema_change" = "true", "enable_unique_key_skip_bitmap_column" = "true", @@ -336,6 +342,7 @@ suite('test_flexible_partial_update_delete_sign') { ) UNIQUE KEY(`k`) DISTRIBUTED BY HASH(`k`) BUCKETS 1 PROPERTIES( "replication_num" = "1", + "disable_auto_compaction" = "true", "enable_unique_key_merge_on_write" = "true", "light_schema_change" = "true", "enable_unique_key_skip_bitmap_column" = "true", @@ -353,4 +360,4 @@ suite('test_flexible_partial_update_delete_sign') { qt_insert_after_delete_3_4 "select k,v1,v2,v3,v4,v5,__DORIS_SEQUENCE_COL__,__DORIS_DELETE_SIGN__ from ${tableName} order by k;" inspect_rows "select k,v1,v2,v3,v4,v5,__DORIS_SEQUENCE_COL__,__DORIS_DELETE_SIGN__,BITMAP_TO_STRING(__DORIS_SKIP_BITMAP_COL__),__DORIS_VERSION_COL__ from ${tableName} order by k,__DORIS_VERSION_COL__,v1,v2,v3,v4,v5;" } -} \ No newline at end of file +} diff --git a/regression-test/suites/unique_with_mow_p0/flexible/test_flexible_partial_update_seq_col.groovy b/regression-test/suites/unique_with_mow_p0/flexible/test_flexible_partial_update_seq_col.groovy index 8296531ea9f68c..6b865b01f1fab7 100644 --- a/regression-test/suites/unique_with_mow_p0/flexible/test_flexible_partial_update_seq_col.groovy +++ b/regression-test/suites/unique_with_mow_p0/flexible/test_flexible_partial_update_seq_col.groovy @@ -287,6 +287,7 @@ suite('test_flexible_partial_update_seq_col') { DISTRIBUTED BY HASH(`k`) BUCKETS 1 PROPERTIES ( "replication_num" = "1", + "disable_auto_compaction" = "true", "enable_unique_key_merge_on_write" = "true", "enable_unique_key_skip_bitmap_column" = "true", "function_column.sequence_col" = "c1"); @@ -321,6 +322,7 @@ suite('test_flexible_partial_update_seq_col') { DISTRIBUTED BY HASH(`k`) BUCKETS 1 PROPERTIES ( "replication_num" = "1", + "disable_auto_compaction" = "true", "enable_unique_key_merge_on_write" = "true", "enable_unique_key_skip_bitmap_column" = "true", "function_column.sequence_col" = "c1"); @@ -343,4 +345,4 @@ suite('test_flexible_partial_update_seq_col') { sql "set skip_delete_bitmap=false;" sql "sync;" } -} \ No newline at end of file +} diff --git a/regression-test/suites/unique_with_mow_p0/partial_update/test_p_seq_publish_read_from_old.groovy b/regression-test/suites/unique_with_mow_p0/partial_update/test_p_seq_publish_read_from_old.groovy index f1a6ea813e85da..bd07a6cf5f454f 100644 --- a/regression-test/suites/unique_with_mow_p0/partial_update/test_p_seq_publish_read_from_old.groovy +++ b/regression-test/suites/unique_with_mow_p0/partial_update/test_p_seq_publish_read_from_old.groovy @@ -35,6 +35,7 @@ suite("test_p_seq_publish_read_from_old") { ) UNIQUE KEY(`k`) DISTRIBUTED BY HASH(`k`) BUCKETS 1 PROPERTIES( "replication_num" = "1", + "disable_auto_compaction" = "true", "enable_unique_key_merge_on_write" = "true", "light_schema_change" = "true", "function_column.sequence_col" = "v1", diff --git a/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_seq_read_from_old.groovy b/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_seq_read_from_old.groovy index 643ded4ef09685..73abf34c1e2099 100644 --- a/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_seq_read_from_old.groovy +++ b/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_seq_read_from_old.groovy @@ -40,6 +40,7 @@ suite('test_partial_update_seq_read_from_old') { ) UNIQUE KEY(`k`) DISTRIBUTED BY HASH(`k`) BUCKETS 1 PROPERTIES( "replication_num" = "1", + "disable_auto_compaction" = "true", "enable_unique_key_merge_on_write" = "true", "light_schema_change" = "true", "enable_unique_key_skip_bitmap_column" = "true", @@ -65,4 +66,4 @@ suite('test_partial_update_seq_read_from_old') { qt_sql3 "select k,v1,v2,v3,v4,v5,__DORIS_SEQUENCE_COL__,__DORIS_DELETE_SIGN__ from ${tableName} order by k;" inspect_rows "select k,v1,v2,v3,v4,v5,__DORIS_SEQUENCE_COL__,__DORIS_DELETE_SIGN__,__DORIS_VERSION_COL__ from ${tableName} order by k,__DORIS_VERSION_COL__;" } -} \ No newline at end of file +}