Skip to content

Commit fb8db61

Browse files
morningmanclaude
andcommitted
[fix](test) wait for delete visibility instead of fixed sleep in test_f_delete_publish_skip_read
The fixed Thread.sleep(12000) before the normal read is racy. When the disable_block HTTP request is queued behind the in-flight flexible stream load on the same BE accept thread, the publish spin only clears at the FE publish timeout (~152s), so the delete (version 4) becomes visible after the read and k1=2 stays visible (3 rows instead of 2). Replace the sleep with a bounded Awaitility poll until the delete is actually published and visible (k1=2 gone). The normal-read count is monotonic 3 -> 2, so this is a stable signal and fails loudly on timeout if the delete were genuinely not applied. Not a product bug; the storage engine applied the delete correctly. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
1 parent fbfd8fb commit fb8db61

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

‎regression-test/suites/fault_injection_p0/flexible/legacy/test_f_delete_publish_skip_read.groovy‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,13 @@ suite("test_delete_publish_skip_read", "nonConcurrent") {
101101
disable_block_in_publish()
102102
t1.join()
103103
t2.join()
104-
Thread.sleep(12000)
104+
// Wait until the delete of k1=2 is actually published and visible instead of guessing a
105+
// fixed duration: when publish is delayed (e.g. the block-disable HTTP is queued behind the
106+
// in-flight stream load and only clears at the FE publish timeout ~152s), a fixed sleep can
107+
// read before the delete's version becomes visible. The normal-read count is monotonic 3 -> 2.
108+
Awaitility.await().atMost(180, TimeUnit.SECONDS).pollInterval(1, TimeUnit.SECONDS).until {
109+
sql("select count(*) from ${table1} where k1 = 2")[0][0] == 0
110+
}
105111
order_qt_sql "select k1,c1,c2,c3,c4,__DORIS_DELETE_SIGN__,__DORIS_VERSION_COL__ from ${table1};"
106112

107113
sql "set skip_delete_sign=true;"

0 commit comments

Comments
 (0)