Skip to content

[Store] Disarm the persistent write-failure injector before the reuse retry in dfs_sync_client_test - #4785

Closed
he-yufeng wants to merge 1 commit into
kvcache-ai:mainfrom
he-yufeng:fix/dfs-sync-revoke-test-disarm
Closed

he-yufeng wants to merge 1 commit into
kvcache-ai:mainfrom
he-yufeng:fix/dfs-sync-revoke-test-disarm

Conversation

@he-yufeng

Copy link
Copy Markdown
Collaborator

Summary

DfsOnlyBatchFailureOnlyRevokesFailedKey (added in #4637) has been failing CTest deterministically on main and on every PR's CI since (e.g. main run 39242136165, and #4764's gate).

The test arms FailingPosixFsAdapter with a persistent write fault — the comment in the adapter says this is deliberate, so the backend's one-shot reopen-retry cannot mask the batch-leg failure. But the second half of the test then expects the revoked key's reuse Put to succeed, which is impossible while the injector is still armed: every later WriteAt fails. The reuse assertion at line 635 fails deterministically (Actual: false).

Fix: disarm the injector (FailWriteCall(-1)) before the retry leg. That is exactly the scenario the second half models — the transient fault has cleared once the failed key has been revoked.

Verification

Linux container (ubuntu 22.04, posix adapter): before the change the test fails at the reuse assertion; after, it passes. Full dfs_sync_client_test suite: 16 passed, 2 environment-skipped (the checksum cases skip the same way they do on CI).

… retry in dfs_sync_client_test

DfsOnlyBatchFailureOnlyRevokesFailedKey arms FailingPosixFsAdapter with a
persistent fault (the design defeats the backend's reopen-retry so the
batch leg surfaces the error), then expects the revoked key's reuse Put to
succeed. With the injector still armed, every later WriteAt keeps failing,
so the retry can never succeed: the test failed deterministically on main
CI (both the post-merge run and every PR's CTest since kvcache-ai#4637).

Disarm the injector before the retry leg, which is exactly the scenario
the second half models: the transient fault has cleared once the failed
key has been revoked. Verified in a Linux container: the test fails at the
reuse assertion before this change and passes after it; the full
dfs_sync_client_test suite goes 16 passed / 2 environment-skipped.

@fcczzz fcczzz left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM.

@he-yufeng

Copy link
Copy Markdown
Collaborator Author

Closing as a duplicate of the earlier #4781 — same root cause (the persistent injector fails the reuse retry), same disarm mechanism, verified equivalent in a Linux container (target test passes, suite 16 passed / 2 environment-skipped). Left a small review note there about keeping the persistent-failure design comment. Whichever lands first unblocks the CI Gate on #4764.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants