Skip to content

Commit 1d85369

Browse files
committed
[fix](regression) Poll the async query profile before checking inverted index filtering
### What problem does this PR solve? Issue Number: None Problem Summary: `test_build_index_read_time_hidden_column` fetched the query profile detail once, right after a profile row with the matching `Sql Statement` appeared, and required `RowsInvertedIndexFiltered` to be present. Backends report the execution profile asynchronously after a query finishes, so the profile row can be listed while the SegmentIterator counters are not merged yet. The nonConcurrent pipeline failed with `RowsInvertedIndexFiltered missing from profile of: select ... as placeholder_index_version ...` even though the query returned the right rows, because the helper read a summary-only profile. The helper now keeps polling the profile detail until the counter appears, bounded by the existing 60s timeout, and only then asserts the filtered-row counts. ### Release note None ### Check List (For Author) - Test: Regression test - `test_build_index_read_time_hidden_column` passed twice on the local cluster built from this head (`doris-local-regression --network 10.26.20.3/24 --offset 23600`). - Failure evidence: nonConcurrent build 1072324 listed the profile row with the matching SQL but its detail had no SegmentIterator counters; the same suite passed on the previous head in build 1072279. - Behavior changed: No - Does this need documentation: No
1 parent 691c951 commit 1d85369

1 file changed

Lines changed: 12 additions & 4 deletions

File tree

‎regression-test/suites/inverted_index_p0/test_build_index_read_time_hidden_column.groovy‎

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ suite("test_build_index_read_time_hidden_column", "nonConcurrent") {
6464

6565
// The inverted index must be the thing answering the predicate: read the scan profile of the
6666
// query and require RowsInvertedIndexFiltered to be reported with the expected count.
67+
// The backend reports the execution profile asynchronously after the query finishes, so the
68+
// profile row can be listed (and its detail fetched) while the SegmentIterator counters are
69+
// still missing; wait for the counter instead of reading it once.
6770
def assert_rows_filtered_by_inverted_index = { String query, int expectedFiltered ->
6871
def profileId = null
6972
for (int t = 0; t < timeout && profileId == null; t += delta_time) {
@@ -77,11 +80,16 @@ suite("test_build_index_read_time_hidden_column", "nonConcurrent") {
7780
}
7881
}
7982
assertNotNull(profileId, "no profile found for: " + query)
80-
def profileDetail = http_get("/rest/v1/query_profile/" + profileId)
81-
def matcher = (profileDetail =~ /RowsInvertedIndexFiltered:&nbsp;&nbsp;(\d+)/)
8283
def filtered = []
83-
while (matcher.find()) {
84-
filtered << Integer.parseInt(matcher.group(1))
84+
for (int t = 0; t < timeout && filtered.isEmpty(); t += delta_time) {
85+
def profileDetail = http_get("/rest/v1/query_profile/" + profileId)
86+
def matcher = (profileDetail =~ /RowsInvertedIndexFiltered:&nbsp;&nbsp;(\d+)/)
87+
while (matcher.find()) {
88+
filtered << Integer.parseInt(matcher.group(1))
89+
}
90+
if (filtered.isEmpty()) {
91+
sleep(delta_time)
92+
}
8593
}
8694
assertFalse(filtered.isEmpty(), "RowsInvertedIndexFiltered missing from profile of: " + query)
8795
filtered.each { assertEquals(expectedFiltered, it) }

0 commit comments

Comments
 (0)