Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

grpc: ReadResp.caught_up never sent for subscription on nonexistent stream #4115

Open
FeepingCreature opened this issue Jan 17, 2024 · 3 comments

Comments

@FeepingCreature
Copy link

FeepingCreature commented Jan 17, 2024

Describe the bug
When subscribing to a nonexistent stream, ReadResp.caught_up is never sent.

To Reproduce
Steps to reproduce the behavior:

  1. GRPC connect to a stream that does not exist.
  2. Receive the subscription confirmation.

Expected behavior
A perfunctory ReadResp.caught_up should be sent.

Actual behavior
No notifications are received.

EventStore details

  • EventStore server version: 23.10.0-jammy

Additional context
This is necessary because there is otherwise no way to differentiate "we have reached the end of the stream" and "we have not received any events yet".

With a normal read we'd get 'stream_not_found', but for a subscription we get 'confirmation' instead.

@FeepingCreature
Copy link
Author

As a workaround, I just went ahead and read the first event of the stream on subscription start.

@ylorph
Copy link
Contributor

ylorph commented Jan 18, 2024

To add to the plot:

scenarios :

  • subcribing to a stream that was never appended to => should have ReadResp.caught_up
  • subscribing to a stream that was appended and completely truncated or soft-delete => should have ReadResp.caught_up

@timothycoleman
Copy link
Contributor

Hi @FeepingCreature, thanks for the bug report. Coincidentally we found and fixed this last week #4108 it'll be released in v24.2. In v24.2 subscriptions will also transition back to catchup rather than drop if there are too many live events arriving at once

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

No branches or pull requests

3 participants