fix(build): stabilize the token-store rename retry test - #97
Open
mtopolnik wants to merge 1 commit into
Open
Conversation
Add a private per-call retry hook so the test restores directory write permissions after a real denied rename on the calling thread. Assert that exactly one retry completes the atomic replacement and consumes the temporary file. Remove the helper thread and its scheduling dependency on the short retry budget. Keep production retry limits and interrupt handling unchanged, and update the test's platform-scope comments. Validation: all 90 FileTokenStoreTest tests pass through Maven on macOS arm64 with Java 8 and Java 25.
mtopolnik
added a commit
to questdb/questdb
that referenced
this pull request
Sep 11, 2026
Point the Java client submodule at e0243e31 from fix/token-store-rename-retry, based on the client's current main. Client PR questdb/java-questdb-client#97 carries the deterministic FileTokenStore rename retry test fix. This replaces the temporary origin/ent reference and includes the intervening client PR-title CI update. The Java fix and its validation remain unchanged.
Contributor
Author
[PR Coverage check]😍 pass : 4 / 4 (100.00%) file detail
|
Contributor
Author
Review: PR #97 at
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix a timing-sensitive token-store test that failed in the
mac-otherjob in QuestDB CI build 269255, reported in questdb/questdb#7263.The test checks that replacing a file succeeds after a permission error. Previously, a background thread had about 80 ms to restore write permission. If that thread ran too late, the test failed even though the retry logic worked correctly.
The test now restores permission immediately after the first failed attempt, without a background thread. It checks that the operation retries exactly once, writes the expected contents, and leaves no temporary file. It also restores the original permissions even if the test fails.
Production behavior stays the same: retry limits, delays, and interrupt handling do not change. The implementation adds a private callback for the test and a null check on retries. The test still needs POSIX file permissions and skips execution as root. It does not test Windows file-sharing errors.
Validation
FileTokenStoreTesttests pass through Maven on macOS arm64 with Java 8 and Java 25.mainadds no other Java changes. The only intervening commit changes the PR-title CI check.git diff --checkpasses.