fix: tolerate writer blocking on win env.#1136
Closed
Elbehery wants to merge 1 commit into
Closed
Conversation
This PR relaxes the assertion for testing concurrent write with long running read TX. The behavior is expected on Win env as file-lock semantics is diff than unix. Signed-off-by: Mustafa Elbehery <elbeherymustafa@gmail.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Elbehery The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
ahrtr
reviewed
Jan 17, 2026
Comment on lines
+503
to
+509
| if runtime.GOOS == "windows" { | ||
| // Tolerate Windows-specific mmap/file-lock behavior — log detailed context for debugging. | ||
| t.Logf("writer commit returned error on Windows (tolerated): err=%v; db_path=%q; InitialMmapSize=%d; write_size=%d; reader_txid=%d; writer_txid=%d; note=reader transaction kept open during writer commit", | ||
| err, path, initMmapSize, testWriteSize, rtx.ID(), wtx.ID()) | ||
| } else { | ||
| t.Errorf("unexpected that the reader blocks writer") | ||
| } |
Member
There was a problem hiding this comment.
I think the write commit delay should have nothing to do with read transaction. It should be caused by the big initMmapSize (1GB).
Proposed action:
- verify that even we remove the read transaction, it's still possible run into the same issue on Windows. Pls let's verify it in a separate PR
- We need to handle InitialMmapSize on Windows in a special logic, e.g. moved max size check; added test for post-max size functioning #1130 (comment). I will follow up this in PR 1130.
Member
Author
|
Superseded by #1137 |
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.
This PR relaxes the assertion for testing concurrent write with long running read TX.
The behavior is expected on Win env as file-lock semantics is diff than unix.
See #1135 (comment)
cc @ahrtr @ivanvc