test(BA-6157): add multi-proxy NFS race regression test#11768
Draft
jopemachine wants to merge 1 commit into
Draft
test(BA-6157): add multi-proxy NFS race regression test#11768jopemachine wants to merge 1 commit into
jopemachine wants to merge 1 commit into
Conversation
This was referenced May 22, 2026
8d131c2 to
3ab9dd3
Compare
dada14e to
0d1bf13
Compare
a1a01a2 to
b9640d3
Compare
0d1bf13 to
7dcbab8
Compare
b9640d3 to
da3310e
Compare
84e303d to
fc4dc36
Compare
da3310e to
5407549
Compare
fc4dc36 to
968d6c3
Compare
5407549 to
74d9524
Compare
968d6c3 to
b40ebc8
Compare
4c2e6ac to
5460ca4
Compare
b40ebc8 to
a94454f
Compare
5460ca4 to
7278de5
Compare
a94454f to
583cb92
Compare
7278de5 to
d5caa79
Compare
583cb92 to
1f2fc01
Compare
d5caa79 to
6b2f68a
Compare
1f2fc01 to
4c07f47
Compare
9ecba5c to
0d1a512
Compare
9bdda29 to
fa1ca45
Compare
e37ca75 to
cf51fc2
Compare
fa1ca45 to
1665bd6
Compare
cf51fc2 to
c171fa4
Compare
56d3465 to
ef41a44
Compare
e517c70 to
6acff68
Compare
6916fd1 to
88c67f3
Compare
6acff68 to
e14f59f
Compare
88c67f3 to
d627067
Compare
51181ab to
fccee9f
Compare
d627067 to
eab1435
Compare
fccee9f to
ee1e510
Compare
3187f15 to
d8ffda6
Compare
ee1e510 to
087b43d
Compare
d8ffda6 to
7c3d4ea
Compare
5dd870e to
c9c67a8
Compare
99ed0cb to
dcf7dc6
Compare
c9c67a8 to
e35aee1
Compare
dcf7dc6 to
363302f
Compare
e35aee1 to
8482a07
Compare
Lock in the BA-3974 fix with a unit test that reproduces the cross-replica upload corruption on a local filesystem — no real NFS required. The trick is to fake the two NFS-only behaviors that conspire to break the legacy append model: - NFS attribute cache staleness: multiple clients can observe the same cached \`st_size\`. We simulate this by patching \`pathlib.Path.stat\` to return a frozen snapshot for the upload temp file. - Lack of cross-client \`O_APPEND\` atomicity: each NFS client computes its own write position from its cached size. We simulate this with \`os.lseek\` + \`os.write\` instead of an \`O_APPEND\` writer. Two test classes: - \`TestLegacyModelCorruptsUnderStaleStatCache\` — proves the bug exists. All concurrent workers pass the BA-3678 offset guard (because they all observe size = 0) and clobber each other at position 0. The on-disk file is shorter than the expected concatenation and does not match the source payload. - \`TestNewModelSurvivesSameChaos\` — same workload through \`TusUploadSession\` produces a byte-perfect result, including under 3x duplicate retries per chunk fired concurrently. This serves as objective regression evidence: a future reader can run this test to confirm both that the legacy model was broken and that the new model fixes it. Resolves BA-6157. Part of epic BA-6153 (implements BA-3974). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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.
📚 Stacked PRs
This PR is part of a 5-PR stack implementing BA-3974 (epic: BA-6153). Merge in order:
feat(BA-6155): add metadata-driven chunk-store upload session enginefix(BA-6156): rewire TUS PATCH/HEAD to chunk-based store(actual user-visible fix)test(BA-6157): add multi-proxy NFS race regression test← you are herefeat(BA-6158): support TUS Checksum extensionfeat(BA-6159): add /upload/status endpoint + progress headersSummary
Resolves BA-6157.