fix: bound cleanup goroutines, fix retry off-by-one, log dispatch errors in S3 adapter#407
Merged
bootjp merged 4 commits intofeature/s3-implfrom Mar 22, 2026
Merged
Conversation
Open
Co-authored-by: bootjp <1306365+bootjp@users.noreply.github.com> Agent-Logs-Url: https://github.com/bootjp/elastickv/sessions/05b29480-e03a-463f-bf8b-bc6bddb738bd
Copilot
AI
changed the title
[WIP] Add S3 adapter for elastickv with extended transaction support
fix: bound cleanup goroutines, fix retry off-by-one, log dispatch errors in S3 adapter
Mar 22, 2026
Owner
|
@copilot fix golangci-lint |
Co-authored-by: bootjp <1306365+bootjp@users.noreply.github.com> Agent-Logs-Url: https://github.com/bootjp/elastickv/sessions/79412b4b-dfc4-4afb-aa1e-6cd71bd2037f
Contributor
Author
Fixed in commit 52cf0ec. The |
bootjp
approved these changes
Mar 22, 2026
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.
Three reliability issues in the S3 adapter identified during review of the
add s3 adapterPR.Changes
retryS3Mutationoff-by-one:attempt >= s3TxnRetryMaxAttemptswithattemptstarting at 0 allowedmaxAttempts+1total calls. Switched tofor attempt := range s3TxnRetryMaxAttemptswith an earlybreakon the last iteration — exactly 8 attempts, no wasted backoff after final failure.Unbounded
cleanupManifestBlobsAsyncgoroutines: High write/delete churn could spawn unbounded goroutines (each holding a 2m timeout context). Added acleanupSem chan struct{}semaphore (capacitys3ManifestCleanupWorkers = 16) toS3Server; cleanup is skipped via non-blockingselectwhen all slots are occupied rather than queuing indefinitely.Silent
coordinator.Dispatchfailures incleanupManifestBlobs: Dispatch errors were discarded with_, _. Now logged viaslog.ErrorContextwith structured fields (bucket,generation,object_key,upload_id,err) so cleanup failures are observable.📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.