Want to consider populating $all position for stream reads/subscriptions. gRPC & non-transaction only. - #3459
Conversation
|
Hello, any update on this PR? Can I help in any way to speed up the merge into master? |
|
Performing some more test have unfortunately highlighted that there is still something to fix: Instead, if I read the same event from a projection, ResolvedEvent.Event.Position and ResolvedEvent.OriginalPosition are the same value, and none of this is the value of the Poisition of the inserted even in its stream. To my understanding ResolvedEvent.OriginalPosition should be the Poistion in the projection but ResolvedEvent.Event.Position really should be the Position of the Event in its own Stream, so the exact same value of the Position from when I read from the stream i've written it into. We are so close!!!! How can I know the Position of the original event? Again, "All" seems to know it correctly, so there should be a way. |
|
Thanks for the repro, did you mean to read |
|
Hello Timothy! Thanks for the fast reply! Do you think it will be possible to have this fantastic fix in an official version soon? |
|
Hello Timothy! |
…ions/persistent subscriptions - grpc only - non-transaction prepares only
f5c6147 to
e5c883d
Compare
|
@ylorph ^ |
|
Wow! I'm so happy to seeing progress on this task and now that also the test are in place, the merge looks really close! thanks again to Timothy for the work, you really can't imagine how much this will improve my application, I can't wait to have this in the main main branch and packed in a nice container image. If I've well understood there is still to wait for @thefringeninja (who have done some related work in PR#2816 and @shaan1337 review. |
|
thanks @PhotoAtomic and you're very welcome. If you could test it out in your application (if you haven't ready) and let us know if you have any problems that would be great. Apart from that the ticket is just going through our normal review and then QA process (which is quite busy at the moment with other things too). It'll be in the next release (22.6) which will likely be out in June or July |
|
My unit tests (on the branch) so far indicates that everything is fine and works accordingly my expectation. |
Update read stream tests to cater for log position changes on the server Context: kurrent-io/KurrentDB#3459
Update read stream tests to cater for log position changes on the server Context: kurrent-io/KurrentDB#3459
Update read stream tests to cater for log position changes on the server Context: kurrent-io/KurrentDB#3459
Update read stream tests to cater for log position changes on the server Context: kurrent-io/KurrentDB#3459
Update read stream tests to cater for log position changes on the server Context: kurrent-io/KurrentDB#3459
Update read stream tests to cater for log position changes on the server Context: kurrent-io/KurrentDB#3459
Update read stream tests to cater for log position changes on the server Context: kurrent-io/KurrentDB#3459
Update read stream tests to cater for log position changes on the server Context: kurrent-io/KurrentDB#3459
Update read stream tests to cater for log position changes on the server Context: kurrent-io/KurrentDB#3459
…tests (#128) * Add GetServerVersion() api method to add ability to retrieve server version * Update datasets with real prepare/commit log positions Update read stream tests to cater for log position changes on the server Context: kurrent-io/KurrentDB#3459
Added: Populate $all position for stream reads/subscriptions/persistent subscriptions. gRPC only. Non-transaction events only.
Currently the $all position (commit and prepare pair) is only provided to the client during $all reads/subscriptions, and not during stream reads/subscriptions. However, the user-facing datastructure does contain fields for this information.
This PR considers the possibility of populating the $all position for stream reads/subscriptions with the following caveats
todo: discuss pros (this is asked for from time to time. a bit odd that the fields are present but not currently populated) and cons (potential confusion with respect to transactions). does it need a server capability added? does it want backporting?
Client impact:
Closes kurrent-io/KurrentDB-Client-Dotnet#211.