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

Fix issue where proto3 clients could not subscribe to $all #1886

Merged
merged 1 commit into from Apr 30, 2019

Conversation

2 participants
@shaan1337
Copy link
Member

commented Mar 7, 2019

Fixes: #1677

An empty string to SubscribeToStream() is interpreted as subscribing to $all by EventStore.

We currently use proto2 on server side.
In proto3, default values (empty string for strings) are omitted and not serialized on the wire (also explained by @prolic in the above issue):
https://developers.google.com/protocol-buffers/docs/proto3#default

This means that a proto3 client trying to subscribe to $all with a proto2 server will result in a null value for the stream id when deserialized on the server side.

The patch simply sets the stream id back to an empty string if it's null.

@shaan1337 shaan1337 requested a review from jageall Apr 30, 2019

@jageall jageall merged commit 461ac04 into master Apr 30, 2019

9 checks passed

EventStore.EventStore Build #20190307.1 succeeded
Details
EventStore.EventStore (Centos 7 x64 Debug) Centos 7 x64 Debug succeeded
Details
EventStore.EventStore (Centos 7 x64 Release) Centos 7 x64 Release succeeded
Details
EventStore.EventStore (Ubuntu 14.04 x64 Debug) Ubuntu 14.04 x64 Debug succeeded
Details
EventStore.EventStore (Ubuntu 14.04 x64 Release) Ubuntu 14.04 x64 Release succeeded
Details
EventStore.EventStore (Windows x64 Debug) Windows x64 Debug succeeded
Details
EventStore.EventStore (Windows x64 Release) Windows x64 Release succeeded
Details
EventStore.EventStore (macOS x64 Debug) macOS x64 Debug succeeded
Details
EventStore.EventStore (macOS x64 Release) macOS x64 Release succeeded
Details

@shaan1337 shaan1337 deleted the proto3-subscribe-to-all-fix branch May 13, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.