Skip to content

fix(show7): replace sleep with @wait_expect for statement_info readiness - #25036

Merged
mergify[bot] merged 2 commits into
matrixorigin:mainfrom
aptend:fix/show7-wait-expect
Jun 18, 2026
Merged

fix(show7): replace sleep with @wait_expect for statement_info readiness#25036
mergify[bot] merged 2 commits into
matrixorigin:mainfrom
aptend:fix/show7-wait-expect

Conversation

@aptend

@aptend aptend commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

What type of PR is this?

  • API-change
  • BUG
  • Improvement
  • Documentation
  • Feature
  • Test and CI
  • Code Refactoring

Which issue(s) this PR fixes:

fixes #25018

What this PR does / why we need it:

show7.sql used a fixed sleep(15) to wait for system.statement_info to be populated before asserting select count(*) > 0. In Multi-CN PROXY mode the async audit pipeline can exceed 15s under CI pressure, causing the BVT to flake (the assertion at the next line gets 0 instead of 1).

Replace the blind sleep with mo-tester native -- @wait_expect(2, 30):

  • Polls every 2s, up to 30s, and stops as soon as the result matches the expected 1.
  • Fast path: ~4s when data lands quickly (vs fixed 15s).
  • Slow path: tolerates up to 30s of audit pipeline delay.
  • First use of @wait_expect in BVT; mo-tester implementation reviewed (no infinite-loop / statement-leak / session hazard).

.result regenerated via run.sh -m genrs (type headers preserved).

Verification

[run mode, -n]
COST: 4s, TOTAL: 8, SUCCESS: 8, FAILED: 0, SUCCESS RATE: 100%

log shows polling working:
[row:10] Starting wait_expect: interval=2s, timeout=30s
[2x] RSRow mismatch (0 != 1)   <- retries
[final] cost: 4.377s, success: 8/8   <- data landed, pass

Use mo-tester @wait_expect(2, 30) polling instead of a fixed sleep(15)
to wait for system.statement_info to be populated. Fixes flaky BVT
failure in Multi-CN PROXY mode where async audit pipeline exceeds 15s.

Fixes matrixorigin#25018
Copilot AI review requested due to automatic review settings June 17, 2026 09:48
@aptend
aptend requested a review from heni02 as a code owner June 17, 2026 09:48
@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a flaky BVT (dml/show/show7.sql) by replacing a fixed sleep(15) wait with mo-tester’s polling-based @wait_expect, improving reliability in Multi-CN PROXY mode where system.statement_info is populated asynchronously.

Changes:

  • Remove the one-shot sleep(15)-based readiness gate for system.statement_info.
  • Add -- @wait_expect(2, 30) to poll for the expected has_data=1 result (interval 2s, timeout 30s).
  • Regenerate show7.result to reflect the updated execution/output.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
test/distributed/cases/dml/show/show7.sql Replaces blind sleep with @wait_expect polling before asserting statement_info has data.
test/distributed/cases/dml/show/show7.result Updates expected output after removing the sleep query and regenerating results.

Comment thread test/distributed/cases/dml/show/show7.sql
@mergify mergify Bot added kind/bug Something isn't working kind/test-ci labels Jun 17, 2026
@mergify mergify Bot added the queued label Jun 18, 2026
@mergify

mergify Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • Entered queue2026-06-18 02:51 UTC · Rule: main
  • Checks passed · in-place
  • Merged2026-06-18 03:53 UTC · at bd89c8a4e9edeff555f30ce474a1a575378afa1b · squash

This pull request spent 1 hour 2 minutes 45 seconds in the queue, including 1 hour 2 minutes 28 seconds running CI.

Required conditions to merge
  • #approved-reviews-by >= 1 [🛡 GitHub branch protection]
  • #review-threads-unresolved = 0 [🛡 GitHub branch protection]
  • github-review-decision = APPROVED [🛡 GitHub branch protection]
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone Compose CI / multi cn e2e bvt test docker compose(PESSIMISTIC)
    • check-neutral = Matrixone Compose CI / multi cn e2e bvt test docker compose(PESSIMISTIC)
    • check-skipped = Matrixone Compose CI / multi cn e2e bvt test docker compose(PESSIMISTIC)
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone Standlone CI / Multi-CN e2e BVT Test on Linux/x64(LAUNCH, PROXY)
    • check-neutral = Matrixone Standlone CI / Multi-CN e2e BVT Test on Linux/x64(LAUNCH, PROXY)
    • check-skipped = Matrixone Standlone CI / Multi-CN e2e BVT Test on Linux/x64(LAUNCH, PROXY)
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone Standlone CI / e2e BVT Test on Linux/x64(LAUNCH, PESSIMISTIC)
    • check-neutral = Matrixone Standlone CI / e2e BVT Test on Linux/x64(LAUNCH, PESSIMISTIC)
    • check-skipped = Matrixone Standlone CI / e2e BVT Test on Linux/x64(LAUNCH, PESSIMISTIC)
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone CI / SCA Test on Ubuntu/x86
    • check-neutral = Matrixone CI / SCA Test on Ubuntu/x86
    • check-skipped = Matrixone CI / SCA Test on Ubuntu/x86
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone CI / UT Test on Ubuntu/x86
    • check-neutral = Matrixone CI / UT Test on Ubuntu/x86
    • check-skipped = Matrixone CI / UT Test on Ubuntu/x86
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone Compose CI / multi cn e2e bvt test docker compose(Optimistic/PUSH)
    • check-neutral = Matrixone Compose CI / multi cn e2e bvt test docker compose(Optimistic/PUSH)
    • check-skipped = Matrixone Compose CI / multi cn e2e bvt test docker compose(Optimistic/PUSH)
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone Standlone CI / e2e BVT Test on Linux/x64(LAUNCH,Optimistic)
    • check-neutral = Matrixone Standlone CI / e2e BVT Test on Linux/x64(LAUNCH,Optimistic)
    • check-skipped = Matrixone Standlone CI / e2e BVT Test on Linux/x64(LAUNCH,Optimistic)
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone Upgrade CI / Compatibility Test With Target on Linux/x64(LAUNCH)
    • check-neutral = Matrixone Upgrade CI / Compatibility Test With Target on Linux/x64(LAUNCH)
    • check-skipped = Matrixone Upgrade CI / Compatibility Test With Target on Linux/x64(LAUNCH)
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone Utils CI / Coverage
    • check-neutral = Matrixone Utils CI / Coverage
    • check-skipped = Matrixone Utils CI / Coverage

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/bug Something isn't working kind/test-ci size/S Denotes a PR that changes [10,99] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] show7.sql: statement_info not populated within 15s wait in Multi-CN PROXY BVT

5 participants