Kirill5k / mongo4cats

MongoDB Java client wrapper for Cats Effect & FS2 and ZIO
https://kirill5k.github.io/mongo4cats/docs/
Apache License 2.0
107 stars 22 forks source link

ZClientSessionLive#commitTransaction and #abortTransaction Ignore Result #28

Closed tilltheis closed 1 year ago

tilltheis commented 1 year ago

ZClientSessionLive#commitTransaction and ZClientSessionLive#abortTransaction ignore their results and always return (). The problem stems from the fact that unlike com.mongodb.reactivestreams.client.ClientSession#startTransaction(), which just returns void, com.mongodb.reactivestreams.client.ClientSession#commitTransaction actually returns Publisher<Void> but ZClientSessionLive#commitTransaction is implemented as if it also just returned void. Same for #abortTransaction. The mongo4cats.client.LiveClientSession does not share this problem.