When using begin_read_write_transaction to manually handle the transaction lifecycle it would be useful to be able to reuse the session when retrying transactions that fail with an ABORTED error to retain lock priority and increase the likelihood that the retried transaction can commit.
Does it sound reasonable to expose the session in the client and transaction api in this manner?
I see that the transaction finish method returns the Option<ManagedSession> as part of the error. Maybe client get_session method could be made public and there could be variants of begin_read_write_transaction and end that take & return the session? Then the user would be partly responsible for the session lifecycle as well.