Repository navigation
test(encryption): give the concurrent ReadAt timing test more headroom - #2640
Open
laskoviymishka wants to merge 1 commit into
Open
laskoviymishka wants to merge 1 commit into
laskoviymishka wants to merge 1 commit into
Conversation
TestStandardEncryptionManager_ConcurrentReadAtOverlaps runs 8 concurrent ReadAt calls over a file with a simulated per-read delay and requires them to finish within half of the serial time. With a 20 ms delay that bound is 80 ms, which leaves about 60 ms for scheduler jitter. Under -race on the macOS runner that was not enough: the test took 85.8 ms on apache#2637 and failed the same way on apache#2602. Raise the delay to 100 ms and keep the bound at half the serial time (400 ms). Concurrent reads still take about one delay, and a serialized implementation takes about 800 ms and still fails. Signed-off-by: laskoviymishka <laskoviymishka@gmail.com>
laskoviymishka
marked this pull request as ready for review
November 19, 2026 08:06
badalprasadsingh
approved these changes
Nov 19, 2026
This branch has not been deployed
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.
TestStandardEncryptionManager_ConcurrentReadAtOverlaps flaked under -race on the macOS runner: it took 85.8 ms against its 80 ms bound on #2637 (run 44307730773) and failed the same way on #2602 (run 44246241526). This raises the simulated read delay from 20 ms to 100 ms and keeps the bound at half the serial time, so it moves to 400 ms while concurrent reads still take about 100 ms.
The test still catches serialization: holding cacheMu across the underlying read makes it fail locally. With the change it passed 20 runs in a row under -race. Only this one test changes.