Skip to content

[test] Wait for KV flush before limit scan - #4051

Merged
platinumhamburg merged 1 commit into
apache:mainfrom
wuchong:fix/3877-limit-scan-flaky
Aug 20, 2026
Merged

[test] Wait for KV flush before limit scan#4051
platinumhamburg merged 1 commit into
apache:mainfrom
wuchong:fix/3877-limit-scan-flaky

Conversation

@wuchong

@wuchong wuchong commented Aug 20, 2026

Copy link
Copy Markdown
Member

Purpose

Linked issue: close #3877

ReplicaManagerTest#testLimitScanPrimaryKeyTable writes a KV batch with acks=1 and immediately scans RocksDB. Since acks=1 only waits for the leader local log append, the scan can race with the asynchronous KV flush and observe the previous state.

Brief change log

  • Use acks=-1 in the limit scan test so the write completes only after the KV high watermark, which is bounded by the flushed RocksDB offset, has advanced.
  • Document why the stronger acknowledgment is required by this test.

Tests

  • ./mvnw -pl fluss-server -am -DskipITs -Dtest=ReplicaManagerTest#testLimitScanPrimaryKeyTable -Dsurefire.failIfNoSpecifiedTests=false test

API and Format

No API or format changes.

Documentation

No documentation changes.

Generative AI disclosure

  • Yes — Codex (gpt-5.6-sol). All changes were reviewed before submission.

Use acks=-1 so the limit scan assertion runs only after the asynchronous KV flush is visible in RocksDB.

Co-Authored-By: Codex <noreply@openai.com>
AI-Model: gpt-5.6-sol
AI-Contributed/Feature: 0/0
AI-Contributed/UT: 3/3
@wuchong
wuchong marked this pull request as ready for review August 20, 2026 04:25

@platinumhamburg platinumhamburg left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM.

@platinumhamburg
platinumhamburg merged commit 3a000ba into apache:main Aug 20, 2026
19 checks passed
@wuchong
wuchong deleted the fix/3877-limit-scan-flaky branch August 20, 2026 08:00
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] Unstable test ReplicaManagerTest.testLimitScanPrimaryKeyTable

2 participants