This is an automated email from the ASF dual-hosted git repository.
liaoxin01 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 94f6a162ada [fix](test) Fix mow_insert_with_partition_drop polluting
neighbor suites (#64376)
94f6a162ada is described below
commit 94f6a162adafdf1822cc80b17ad151d28bc6b1d3
Author: Xin Liao <[email protected]>
AuthorDate: Thu Jun 25 16:21:08 2026 +0800
[fix](test) Fix mow_insert_with_partition_drop polluting neighbor suites
(#64376)
### Problem
In the S3 P0 cloud release regression,
`query_p0.system.test_partitions_schema` was reported as failing, but
the stack trace actually came from
`insert_p0/mow_insert_with_partition_drop.groovy`:
```
mow_insert_with_partition_drop$_run_closure1$_closure2.doCall(mow_insert_with_partition_drop.groovy:53)
mow_insert_with_partition_drop$_run_closure1$_closure3.doCall(mow_insert_with_partition_drop.groovy:60)
groovy.lang.Closure.run / java.lang.Thread.run
```
`mow_insert_with_partition_drop` runs `do_insert_into()` inside a raw
`Thread.startDaemon { ... }` and only does `t1.join()` on the main
thread. The insert loop asserts (`assertTrue`) that the exception raised
while a partition is concurrently dropped matches an expected message.
When that assertion fails:
1. The `AssertionError` is thrown on the **daemon thread**.
2. `t1.join()` returns normally — `Thread.join()` does **not** re-throw
a child thread's exception, so this suite is recorded as **passed**.
3. The uncaught failure leaks out of the daemon thread and gets
mis-attributed to whichever suite is running at that moment (here,
`test_partitions_schema`), which is then wrongly recorded as **failed**.
### Fix
- Run the insert loop through the regression framework's `thread { ...
}` helper and wait via `future.get()`, so any exception is propagated
back to and **correctly attributed to this suite** instead of leaking
onto a neighbor.
- Attach the actual exception message to the `assertTrue`, so that if
the insert raises an unexpected error the real message is visible and
debuggable.
The accepted-message whitelist is intentionally left unchanged: this
keeps the test's original guard (commit must fail with the expected
message when a partition is dropped) and avoids masking a genuine
cloud-mode regression. If, with correct attribution, the real message
turns out to be a legitimate concurrent-DDL error, a follow-up can
extend the whitelist.
---
.../insert_p0/mow_insert_with_partition_drop.groovy | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git
a/regression-test/suites/insert_p0/mow_insert_with_partition_drop.groovy
b/regression-test/suites/insert_p0/mow_insert_with_partition_drop.groovy
index 8f9c6d97a54..c1cb9a0ecd8 100644
--- a/regression-test/suites/insert_p0/mow_insert_with_partition_drop.groovy
+++ b/regression-test/suites/insert_p0/mow_insert_with_partition_drop.groovy
@@ -49,19 +49,26 @@ suite("mow_insert_with_partition_drop") {
j++
} catch (Exception e) {
logger.info("exception=" + e.getMessage())
- assertTrue(e.getMessage().contains("Insert has filtered data
in strict mode. url:") ||
- (e.getMessage().contains("partition") &&
e.getMessage().contains("does not exist")))
+ assertTrue((e.getMessage().contains("Insert has filtered data
in strict mode")
+ && e.getMessage().contains("url:")) ||
+ (e.getMessage().contains("partition") &&
e.getMessage().contains("does not exist")),
+ "unexpected insert exception message: " +
e.getMessage())
}
}
}
- def t1 = Thread.startDaemon {
+ // Run the insert loop through the regression framework's thread() helper
so that
+ // any assertion/exception is propagated back to this suite via
future.get().
+ // Using a raw Thread.startDaemon + join() would swallow the child-thread
exception
+ // (join() does not re-throw), letting the uncaught failure leak out and
get
+ // mis-attributed to whichever suite happens to be running at that moment.
+ def t1 = thread {
do_insert_into()
}
for (int i = 0; i < 30; i++) {
sql """ ALTER TABLE ${table} DROP PARTITION p3 force; """
sql """ ALTER TABLE ${table} ADD PARTITION p3 VALUES LESS THAN
('2023-01-01'); """
}
- t1.join()
-}
\ No newline at end of file
+ t1.get()
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]