Skip to content

[test] Wait for KV flush before ScanKv tests - #5489

Merged
swuferhong merged 1 commit into
apache:mainfrom
fxbing:fix/20261203-scan-kv-snapshot-flush
Dec 3, 2026
Merged

swuferhong merged 1 commit into
apache:mainfrom
fxbing:fix/20261203-scan-kv-snapshot-flush

Conversation

@fxbing

@fxbing fxbing commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

Purpose

Closes #5488.

TabletServiceITCase.testScanKv_explicitClose can fail during setup when its snapshot request runs before the asynchronous KV flush.

Brief change log

  • Use waitUntilKvFlushed in the nine scanKv tests so the written rows are visible when the scanner opens its local RocksDB snapshot.
  • Check the bucket error in assertPutKvResponse so a failed setup write is reported at the write.

Tests

  • With a temporary 500 ms flush delay, the original testScanKv_explicitClose failed with No new snapshot triggered. With the fix and the same delay, all 11 testScanKv* cases passed.
  • With the delay removed, TabletServiceITCase passed on Java 11: 29 passed, 2 skipped.

API and Format

No changes.

Documentation

No changes.

Generated-by: OpenAI Codex (GPT-6)

Use the leader KV flush offset to wait for scan data in RocksDB. Check bucket write errors before using the result to set up the scan.
@swuferhong
swuferhong merged commit 70e7308 into apache:main Dec 3, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[test] TabletServiceITCase.testScanKv_explicitClose can fail before opening the scanner

2 participants