Skip to content

Conversation

@jeremyrsmith
Copy link
Collaborator

This introduces a method Client#inTransaction, which accepts a function from Client to Future[T]. The operations on the passed Client will be executed on a new Client with a single connection (created with ServiceFactory.const). If the resulting future is successful, the transaction will be committed; if it fails, the transaction will be rolled back. The temporary single-connection client is then closed.

This introduces a method `Client#inTransaction`, which accepts a function from `Client` to `Future[T]`.  The operations on the passed `Client` will be executed on a new `Client` with a single connection (created with `ServiceFactory.const`).  If the resulting future is successful, the transaction will be committed; if it fails, the transaction will be rolled back.  The temporary single-connection client is then closed.
@coveralls
Copy link

coveralls commented Jun 30, 2016

Coverage Status

Coverage decreased (-0.3%) to 16.396% when pulling 488f1d2 on jeremyrsmith:add-transactions into f2bac3d on finagle:master.

@jeremyrsmith
Copy link
Collaborator Author

Note that when #21 is pushed, the coverage won't decrease from changes like this. It only decreases because integration tests aren't currently run in travis (which is fixed by #21)

@jeremyrsmith jeremyrsmith merged commit cbe3322 into finagle:master Jul 12, 2016
@jeremyrsmith jeremyrsmith deleted the add-transactions branch July 12, 2016 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants