Event position 18446744073709551615

Hello, I’m experimenting with EventStore DB. I’m using the GRPC client with C#, I’m able to write and read events; but when I read, any stream and any event gives me the Event.Position {C:18446744073709551615/P:18446744073709551615}
looks very suspicious to me that 18446744073709551615 is equal to the max ulong (plus, a fields that always have the same value really doesn’t have any utility)

Anyway, when I write events, each write returns a meaningful position (much much lower than this one, and always varying)

Is it a problem only I have? did I miss-intepreted the meaning of the “Position” field? Or there is some issue in the GRPC client?

What can I do to diagnose where the problem is, how can i solve this and having the real position of the event, when I read a stream?

1 Like

Looks like the Event.Position is provided with a meaningful value only if the read occurs on the $all stream which is quite useless in my opinion because prevents several optimization that can be applied while reading from specific streams while maintaining the absolute ordering of the events.
Also the server filtering capability of events / streams is available only on the “SubscribeToAllAsync” method not on the “ReadAllAsync” which makes extremely difficult to process them.
I really can’t udnerstand the reason of this kind of design, i’m sure there is a good expleination and i would like to know about it, as i suspect it will be very interesting. Someone can shread some light on this point?

I am experiencing the same issue and having similar questions.

I’ve just noticed that the position for each event in a stream is 18446744073709551615
when using

var stream = eventStoreClient.ReadStreamAsync(Direction.Forwards, _streamName,StreamPosition.Start);
var resolvedEvents = await stream.ToListAsync();

My stream has 6 events and all of them have the same commit and prepare position.

I am using

<PackageReference Include="EventStore.Client.Grpc.Streams" Version="21.2.0" />

The ES is 20.10.0-bionic as a docker container

docker run --name esdb-node -it -p 2113:2113 -p 1113:1113 eventstore/eventstore:20.10.0-bionic --insecure --enable-atom-pub-over-http --mem-db=True

When using

eventStoreClient.SubscribeToAllAsync(startPosition, handler)

I can see in the resolvedEvent within the callback that the position seems a valid number this time, and each event has a different one, as expected.

Also after appending events, I can get the last position as expected.

I don’t have any particular issue with my scenarios, but I’m also curious about why reading a stream retrieves events claiming to be at the same (and last possible) position

I’ve talked to a developer from EventStore: he told me that it is a known issue and they are working on it, hopefully it will be fixed for the next version.