Skip to content

fix(persistent-subscriptions): reply not ready before startup#157

Merged
yordis merged 2 commits intomasterfrom
yordis/fix-persistent-subscriptions-not-ready
May 3, 2026
Merged

fix(persistent-subscriptions): reply not ready before startup#157
yordis merged 2 commits intomasterfrom
yordis/fix-persistent-subscriptions-not-ready

Conversation

@yordis
Copy link
Copy Markdown
Member

@yordis yordis commented May 3, 2026

  • Persistent subscription clients need a retryable response while the service is loading after leadership changes.
  • HTTP callers need a service-unavailable response instead of an unexpected server error when the subsystem is not ready.

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
@cursor
Copy link
Copy Markdown

cursor Bot commented May 3, 2026

PR Summary

Medium Risk
Changes wire/HTTP behavior for persistent subscription management and connection requests when the subsystem hasn’t started, which could affect client retry/handling paths. Scope is contained and covered by new tests, but touches multiple request handlers and HTTP response mapping.

Overview
Persistent subscription operations now return a retryable ClientMessage.NotHandled(NotReady) instead of silently doing nothing when the subsystem hasn’t started (create/update/delete, connect, read-next, replay-parked).

HTTP endpoints for persistent subscriptions and stats now treat NotHandled responses as proper service-level errors (notably mapping NotReady to 503 Service Unavailable) by reusing a shared Configure.HandleNotHandled helper (made public).

Adds PersistentSubscriptionServiceNotReadyTests to assert NotReady replies across the affected message types.

Reviewed by Cursor Bugbot for commit 6213cf1. Bugbot is set up for automated code reviews on this repo. Configure here.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 3, 2026

Warning

Rate limit exceeded

@yordis has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 21 minutes and 13 seconds before requesting another review.

To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 2c610390-3550-47ba-865c-ff9e841baebc

📥 Commits

Reviewing files that changed from the base of the PR and between 270f627 and 6213cf1.

📒 Files selected for processing (4)
  • src/EventStore.Core.Tests/Services/PersistentSubscription/PersistentSubscriptionServiceNotReadyTests.cs
  • src/EventStore.Core/Services/PersistentSubscription/PersistentSubscriptionService.cs
  • src/EventStore.Core/Services/Transport/Http/Configure.cs
  • src/EventStore.Core/Services/Transport/Http/Controllers/PersistentSubscriptionController.cs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch yordis/fix-persistent-subscriptions-not-ready

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
Review rate limit: 0/1 reviews remaining, refill in 21 minutes and 13 seconds.

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 1091a08. Configure here.

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
@yordis yordis merged commit 16282f4 into master May 3, 2026
18 checks passed
@yordis yordis deleted the yordis/fix-persistent-subscriptions-not-ready branch May 3, 2026 06:13
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.

1 participant