Skip to content

fix: tolerate writer blocking on win env.#1136

Closed
Elbehery wants to merge 1 commit into
etcd-io:mainfrom
Elbehery:20260117_relax_InitialMmapSize_windows
Closed

fix: tolerate writer blocking on win env.#1136
Elbehery wants to merge 1 commit into
etcd-io:mainfrom
Elbehery:20260117_relax_InitialMmapSize_windows

Conversation

@Elbehery

Copy link
Copy Markdown
Member

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

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>
@k8s-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Elbehery
Once this PR has been reviewed and has the lgtm label, please assign serathius for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Comment thread db_test.go
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")
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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:

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

lgtm 👍🏽

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

raised #1137

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@ahrtr shall we close this PR ?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@ahrtr shall we close this PR ?

yes

@Elbehery

Copy link
Copy Markdown
Member Author

Superseded by #1137

@Elbehery Elbehery closed this Jan 17, 2026
@Elbehery
Elbehery deleted the 20260117_relax_InitialMmapSize_windows branch January 17, 2026 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

3 participants