Closed daMupfel closed 2 years ago
On hold, as we are reviewing an RFC on this very subject.
Are there any news on this? We are currently waiting on a few of the open issues in order to migrate to a newer eventstore version (the other client is currently not an option for us).
Any progress here?
It seems that some progress was made now. I did some tests with the latest snapshot version.
Regarding point 1 (see initial message): This still seems to be broken. It will return now 0 instead of 1 which is still not an empty stream. I assume we need to change the type of getNextExpectedRevision to the new ExpectedRevision type so we can represent an empty stream.
Regarding point 2: This works now as intended. Within the exception we now have the ExpectedRevision type which will return an ExpectedRevision.noStream() / NoStreamExpectedRevision.
Change will happen at that line: https://github.com/EventStore/EventStoreDB-Client-Java/blob/trunk/db-client-java/src/main/java/com/eventstore/dbclient/AppendToStream.java#L52
The protobuf api does descriminate between NoStream
and actual stream revision. A patch will come soon.
@YoEight Any updates when the patch is coming?
Hi @YoEight :wave:. I was wondering if you guys would be up for this to be contributed via a PR?
I wasn't sure since it might contain breaking changes (depending on how it is implemented) and it seemed as it would be done soon anyway.
Best regards, David
Unfortunately I'm a Java developer (very little C# knowledge)
Sorry for the late response, the patch is there: https://github.com/EventStore/EventStoreDB-Client-Java/pull/196
Thank you @YoEight for the patch. Would you know when we can roughly expect a release with this fix included?
Once reviewed, soon-ish. I need to double-check a few things but I don't think there is anything preventing the v4 release.
Thank you very much! We are looking forward to this landing :).
Client version 4.0.0 is available on Maven: https://central.sonatype.dev/artifact/com.eventstore/db-client-java/4.0.0
While using the client i found some weird corner cases that around appendToSTream when used on an empty stream.
Basically it does not seem to be possible based on the return message to identify that the stream was empty.
There are basically two different cases.
This seems rather odd to me since i would expect a token indicating that we are at the beginning of the stream (which is currently a bit problematic because a StreamVersion currently only holds an "unsigned" long.
By digging a bit deeper it looks like the two values are arbitrarily set by the client (in AppendToStream.java):
and