This is an automated email from the ASF dual-hosted git repository.
dataroaring pushed a commit to branch branch-3.0
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-3.0 by this push:
new 03a026943b6 branch-3.0: [test](inverted index) enhance compaction
assertion compatibility for format v2 regression cases #53808 (#53832)
03a026943b6 is described below
commit 03a026943b620a945193b396cbe29402cf90093c
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Thu Jul 24 17:05:39 2025 +0800
branch-3.0: [test](inverted index) enhance compaction assertion
compatibility for format v2 regression cases #53808 (#53832)
Cherry-picked from #53808
Co-authored-by: airborne12 <[email protected]>
---
.../test_cumulative_compaction_with_format_v2.groovy | 16 ++++++++++++++--
.../index_format_v2/test_mow_table_with_format_v2.groovy | 16 ++++++++++++++--
2 files changed, 28 insertions(+), 4 deletions(-)
diff --git
a/regression-test/suites/inverted_index_p0/index_format_v2/test_cumulative_compaction_with_format_v2.groovy
b/regression-test/suites/inverted_index_p0/index_format_v2/test_cumulative_compaction_with_format_v2.groovy
index 6e39fa09fcd..6af721010ad 100644
---
a/regression-test/suites/inverted_index_p0/index_format_v2/test_cumulative_compaction_with_format_v2.groovy
+++
b/regression-test/suites/inverted_index_p0/index_format_v2/test_cumulative_compaction_with_format_v2.groovy
@@ -198,10 +198,22 @@ suite("test_cumulative_compaction_with_format_v2",
"inverted_index_format_v2") {
(code, out, err) = be_show_tablet_status(ip, port, tablet_id)
logger.info("Run show: code=" + code + ", out=" + out + ", err=" +
err)
assertTrue(out.contains("[0-1]"))
- assertTrue(out.contains("[2-9]"))
+ // Parse the tablet status to get rowset count after compaction
+ def tabletJson = parseJson(out.trim())
+ def rowsets = tabletJson.rowsets
+ int activeRowsetCount = rowsets.size()
+ // After compaction, we should have fewer rowsets than before
(originally 9 rowsets: [0-1], [2-2], ..., [9-9])
+ // The exact number depends on compaction strategy, but should be
less than 9
+ assertTrue(activeRowsetCount < 9, "Expected fewer rowsets after
compaction, got: ${activeRowsetCount}")
+ assertTrue(activeRowsetCount >= 2, "Expected at least 2 rowsets
after compaction, got: ${activeRowsetCount}")
+ // Verify we still have [0-1] and some compacted rowsets starting
from version 2
+ boolean hasBaseRowset = rowsets.any { it.contains("[0-1]") }
+ boolean hasCompactedRowsets = rowsets.any { it.contains("[2-") }
+ assertTrue(hasBaseRowset, "Should have base rowset [0-1]")
+ assertTrue(hasCompactedRowsets, "Should have compacted rowsets
starting from version 2")
int segment_count = calc_segment_count(tablet)
logger.info("TabletId: " + tablet_id + ", segment_count: " +
segment_count)
- check_nested_index_file(ip, port, tablet_id, 2, 3, "V2")
+ check_nested_index_file(ip, port, tablet_id, activeRowsetCount, 3,
"V2")
}
int segmentsCount = 0
diff --git
a/regression-test/suites/inverted_index_p0/index_format_v2/test_mow_table_with_format_v2.groovy
b/regression-test/suites/inverted_index_p0/index_format_v2/test_mow_table_with_format_v2.groovy
index f1b7f076ba7..7fa1a2f93d1 100644
---
a/regression-test/suites/inverted_index_p0/index_format_v2/test_mow_table_with_format_v2.groovy
+++
b/regression-test/suites/inverted_index_p0/index_format_v2/test_mow_table_with_format_v2.groovy
@@ -198,8 +198,20 @@ suite("test_mow_table_with_format_v2",
"inverted_index_format_v2") {
(code, out, err) = be_show_tablet_status(ip, port, tablet_id)
logger.info("Run show: code=" + code + ", out=" + out + ", err=" +
err)
assertTrue(out.contains("[0-1]"))
- assertTrue(out.contains("[2-9]"))
- check_nested_index_file(ip, port, tablet_id, 2, 3, "V2")
+ // Parse the tablet status to get rowset count after compaction
+ def tabletJson = parseJson(out.trim())
+ def rowsets = tabletJson.rowsets
+ int activeRowsetCount = rowsets.size()
+ // After compaction, we should have fewer rowsets than before
(originally 9 rowsets: [0-1], [2-2], ..., [9-9])
+ // The exact number depends on compaction strategy, but should be
less than 9
+ assertTrue(activeRowsetCount < 9, "Expected fewer rowsets after
compaction, got: ${activeRowsetCount}")
+ assertTrue(activeRowsetCount >= 2, "Expected at least 2 rowsets
after compaction, got: ${activeRowsetCount}")
+ // Verify we still have [0-1] and some compacted rowsets starting
from version 2
+ boolean hasBaseRowset = rowsets.any { it.contains("[0-1]") }
+ boolean hasCompactedRowsets = rowsets.any { it.contains("[2-") }
+ assertTrue(hasBaseRowset, "Should have base rowset [0-1]")
+ assertTrue(hasCompactedRowsets, "Should have compacted rowsets
starting from version 2")
+ check_nested_index_file(ip, port, tablet_id, activeRowsetCount, 3,
"V2")
}
int segmentsCount = 0
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]