Skip to content

[kv] Fix flaky KvTabletSnapshotTargetTest.testAddToSnapshotToStoreFail#3264

Open
Kaixuan-Duan wants to merge 1 commit intoapache:mainfrom
Kaixuan-Duan:issue-2624-unstable-test
Open

[kv] Fix flaky KvTabletSnapshotTargetTest.testAddToSnapshotToStoreFail#3264
Kaixuan-Duan wants to merge 1 commit intoapache:mainfrom
Kaixuan-Duan:issue-2624-unstable-test

Conversation

@Kaixuan-Duan
Copy link
Copy Markdown

Purpose

Linked issue: close #2624

Brief change log

  • Reorder KvTabletSnapshotTarget#updateStateOnCommitSuccess so the outward-visible updates happen first:
    1.assign logOffsetOfLatestSnapshot
    2.assign snapshotSize
    3.invoke updateMinRetainOffset.accept(flushedLogOffset)
    4.then (in finally) invoke rocksIncrementalSnapshot.notifySnapshotComplete(snapshotId)
  • The RocksDB bookkeeping call is wrapped in a finally block so the internal uploadedSstFiles cleanup is guaranteed even if an outward update throws in the future.

Tests

./mvnw -pl fluss-server test -Dtest='KvTabletSnapshotTargetTest#testAddToSnapshotToStoreFail'

API and Format

No API or storage format change.

Documentation

No user-facing documentation change.

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.

Unstable Test: KvTabletSnapshotTargetTest.testAddToSnapshotToStoreFail

1 participant