Add regression test for semaphore permits after a failed block batch - #3
Merged
ClaudiuSchuster merged 1 commit intoSep 2, 2026
Conversation
Drive the real uploadAndCollectBlockData path against a local HTTP test server that fails one block of the batch, with blockUploadSemaphore sized to 2, and assert that both permits can be acquired again afterwards. On master (9d772d0) this fails with "context deadline exceeded" because the collector returns on the first error and the remaining worker stays blocked on the unbuffered result channel, never releasing its permit. With the worker-drain change in this PR it passes, including under -race.
jomplox
force-pushed
the
test/upload-batch-permit-regression
branch
from
September 2, 2026 12:48
f76edaf to
87d0188
Compare
ClaudiuSchuster
merged commit Sep 2, 2026
47d69aa
into
oss-singularity:fix/drain-upload-block-workers
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.
Test-only follow-up for rclone#8, as discussed there. No code changes: it adds
TestFailedBlockBatchReleasesEverySemaphorePermit, which drives the realuploadAndCollectBlockDatapath against a local HTTP test server that fails one block of the batch, withblockUploadSemaphoresized to 2, and asserts both permits can be acquired again afterwards.On master (9d772d0) it fails with
context deadline exceeded; on this branch (1d2e00d) it passes, including-race -count=3.go vet ./...clean. Uses the gopenpgp v3 key generation API that master now requires.Intended to sit alongside the existing repeated-batch test, not replace it.