Read concurrency#437
Open
Alrighttt wants to merge 7 commits into
Open
Conversation
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.
Tip: disable this comment in your organization's Code Review settings.
Contributor
Author
|
As discussed with Nate and Luke, I will be redesigning or removing the peer cancellation logic. Don't bother with review for now. |
n8mgr
reviewed
Jun 8, 2026
| err error | ||
| // goroutines spawned for this peer can observe ctx.Done() to short-circuit when the peer is | ||
| // gone. | ||
| ctx context.Context |
Member
There was a problem hiding this comment.
Go advises against keeping contexts on the struct because it can cause leaks. Contexts should be short-lived.
eaf7c4c to
db7a3a3
Compare
Contributor
Author
|
I removed all code related to the peer cancellation mechanism. |
lukechampine
reviewed
Jun 9, 2026
| // calls. Buckets obtained via the DB inside fn must not be used | ||
| // after fn returns. Writes via the DB inside fn are not durable | ||
| // and may panic. | ||
| View(fn func(DB) error) error |
Member
There was a problem hiding this comment.
this makes me sad
maybe we could add a writeable flag on Bucket() instead?
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.
Changes
Manager.mutosync.RWMutexto enable reads to run in parallel.