This is an automated email from the ASF dual-hosted git repository. morningman pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/doris-cli.git
commit 2f936a62903ba3911a8a1eedf1014401c61a7b8c Author: Mingyu Chen (Rayner) <[email protected]> AuthorDate: Fri May 29 17:15:45 2026 +0800 test: wait for partition RowCount before tablet assertions Doris reports SHOW PARTITIONS' RowCount asynchronously (BE->FE tablet report), so the e2e setup could finish loading and hand off to the tablet suite while RowCount was still 0, making the `tablet: events overview` assertion `.total_rows>0` flaky. After load, poll the tablet command's `.total_rows` (the exact value the assertion checks, via the same code path) until it materializes, bounded by ROWCOUNT_TIMEOUT (default 120s). On timeout we proceed and let the assertion surface the lag rather than hanging. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> --- tests/e2e/data.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/tests/e2e/data.sh b/tests/e2e/data.sh index 66e4682..d41a65d 100644 --- a/tests/e2e/data.sh +++ b/tests/e2e/data.sh @@ -109,6 +109,26 @@ setup_data() { log " ${C_YELLOW}note${C_RESET}: ANALYZE TABLE events did not succeed; columns[].ndv may be empty" fi + # --- wait for partition RowCount to be reported (drives tablet total_rows) --- + # Doris updates SHOW PARTITIONS' RowCount asynchronously (BE->FE tablet report), + # so right after a load it can still read 0 while the rows are already queryable. + # The tablet suite asserts total_rows>0 (summed from SHOW PARTITIONS), so poll the + # exact same value until it materializes. Bounded by ROWCOUNT_TIMEOUT (default + # 120s); on timeout we proceed and let the assertion surface the lag, never hang. + local rc_timeout="${ROWCOUNT_TIMEOUT:-120}" rc_waited=0 rc_rows="" rc_ok=0 + while :; do + _run_dcli --format json tablet "$db.events" + rc_rows="$(jget '.total_rows')" + case "$rc_rows" in [1-9]*) rc_ok=1; break;; esac + [ "$rc_waited" -ge "$rc_timeout" ] && break + sleep 3; rc_waited=$((rc_waited + 3)) + done + if [ "$rc_ok" = 1 ]; then + log " events RowCount reported (total_rows=$rc_rows after ${rc_waited}s)" + else + log " ${C_YELLOW}note${C_RESET}: events total_rows still 0 after ${rc_waited}s — tablet 'total_rows>0' may FAIL (SHOW PARTITIONS RowCount report lag)" + fi + log "${C_GREEN} setup complete${C_RESET}" } --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
