Replication stream multi-cursor#10147
Draft
robholland wants to merge 6 commits intotemporalio:mainfrom
Draft
Conversation
yux0
reviewed
May 4, 2026
| h, ok := m.readers[namespaceID] | ||
| m.mu.RUnlock() | ||
| if !ok { | ||
| return 0, false |
yux0
reviewed
May 4, 2026
| // namespace IDs to create dedicated readers, keeping the default LOW reader from stalling. | ||
| type NamespaceThrottler interface { | ||
| // RecordTask records an incoming LOW-priority task for the given namespace. | ||
| RecordTask(namespaceID string) |
Contributor
There was a problem hiding this comment.
how does this work without pass in the task id?
Contributor
Author
There was a problem hiding this comment.
We don't actually care about the task per se, just that we've had a task for the given namespace. Is there better naming here maybe to make that clearer? The standard for throttling interfaces like this has been Allow but we aren't returning yes/no here as the throttling system is after-the-fact in this instance.
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.
What changed?
EnableReplicationNamespaceIsolation.
Why?
A large backfill can flood the LOW-priority replication lane and stall catchup for every other namespace behind it. The isolation manager gives those heavily loaded namespaces their own reader so the default LOW reader is unblocked. The ReplicationReaderGroup is a prerequisite refactor, the scope-index arithmetic needs to live in one place before we can extend it to support per-namespace cursors cleanly. Both features are off by default and the stream restarts itself if either flag changes at runtime. The namespace throttler allows per-namespace adjustments of low priority limits.
How did you test it?
Potential risks
Any change is risky. Identify all risks you are aware of. If none, remove this section.