Skip to content

Add RESOURCE_EXHAUSTED_CAUSE_SHARD_PERSISTENCE_LIMIT resource-exhausted cause - #900

Merged
prathyushpv merged 3 commits into
mainfrom
ppv/shard-persistence-limit-cause
Nov 2, 2026
Merged

prathyushpv merged 3 commits into
mainfrom
ppv/shard-persistence-limit-cause

Conversation

@prathyushpv

Copy link
Copy Markdown
Contributor

What changed?
Adds RESOURCE_EXHAUSTED_CAUSE_SHARD_PERSISTENCE_LIMIT = 13 to the ResourceExhaustedCause enum.

Why?
The server returns RESOURCE_EXHAUSTED_CAUSE_PERSISTENCE_LIMIT both when a namespace hits its overall persistence limit and when it hits the per-namespace, per-shard limit (history.persistencePerShardNamespaceMaxQPS), so the two can't be told apart in metrics. This follows up on #649/#654, which chose the cause enum over new scopes for this distinction.

Breaking changes
None

@prathyushpv
prathyushpv marked this pull request as ready for review November 2, 2026 17:12
@prathyushpv
prathyushpv requested review from a team November 2, 2026 17:12
RESOURCE_EXHAUSTED_CAUSE_BANDWIDTH_LIMIT = 11;
// Caller exceeds Nexus requests per second limit.
RESOURCE_EXHAUSTED_CAUSE_CALLER_RPS_LIMIT = 12;
// Namespace exceeds persistence rate limit on a single shard.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should not mention Namespace here? given this can be combined with scope System

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right! I will remove this

@prathyushpv
prathyushpv merged commit 2f3dbe2 into main Nov 2, 2026
4 checks passed
@prathyushpv
prathyushpv deleted the ppv/shard-persistence-limit-cause branch November 2, 2026 19:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants