Skip to content

Commit 9bedf7e

Browse files
author
lane-u5a-2359
committed
test: give the waiting writer more attempts than the parent can hold for
Thread 4544685126 claims a child can still exhaust its retries before the parent releases the lock. Measured at head 2464d70 the parent is the holder in both waiting rows, acquiring at lines 1568 and 1602 and releasing at lines 1586 and 1618, and the two barrier polls in between run to 15000 ms each at lines 1576, 1579, 1610 and 1614, so the ceiling on the hold is their sum, 30000 ms. 100 attempts at 250 ms gave the child 25000 ms, 5000 ms short of that ceiling, and 121 attempts give 30250 ms, 250 ms above it. The comment now names the sum of the two barrier polls, which is the quantity that binds the child. The identifier keeps the name of the sizing this replaces, and that name is a residue rather than a description. Nothing here is verification. No Stryker leg ran for this change, so no mutation digest exists for it, and the hosted windows runner has never been read on this machine. the mutation leg is unmeasured, a PASS over an empty digest is not evidence in either direction, and CI at the first pushed unit is the only proof of the gate.
1 parent 2464d70 commit 9bedf7e

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

‎src/utils/__tests__/fileLock.test.ts‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1523,10 +1523,12 @@ describe("a writer that had to wait merges into what landed while it waited", ()
15231523
return "merge-trace-" + traceIndex + ".txt"
15241524
}
15251525

1526-
// The attempts a waiting child gets must outlast the 25000 ms this suite polls for its
1527-
// OUTCOME line, so the deadline is that poll budget divided by the 250 ms gap rather than
1528-
// a count that lets the child give up about 1.25 seconds after its first refusal.
1529-
const waiterAttemptsForOutcomeBudget = 100
1526+
// The attempts a waiting child needs are set by the two barrier polls that run while this process
1527+
// still holds the lock, 15000 ms each at lines 1576 and 1579 and at lines 1610 and 1614, so the
1528+
// ceiling is their sum of 30000 ms rather than the 25000 ms poll for the OUTCOME line, which
1529+
// starts after the release and cannot bind the child. 121 attempts at 250 ms is 30250 ms, 250 ms
1530+
// above that ceiling, and 100 attempts was 5000 ms below it.
1531+
const waiterAttemptsForOutcomeBudget = 121
15301532
it(
15311533
"lands two concurrent merge writers and a foreign writer into one file through one artefact",
15321534
{ timeout: 60000 },

0 commit comments

Comments
 (0)