Github user anew commented on a diff in the pull request:
https://github.com/apache/incubator-tephra/pull/47#discussion_r138437669
--- Diff: tephra-core/src/main/java/org/apache/tephra/TransactionSystemClient.java ---
@@ -89,21 +89,38 @@
*
* @param tx transaction to verify
* @param changeIds ids of changes made by transaction
- * @return true if transaction can be committed otherwise false
- * @throws TransactionSizeException if the size of the chgange set exceeds the allowed
limit
- * @throws TransactionNotInProgressException if the transaction is not in progress;
most likely it has timed out.
+ *
+ * @throws TransactionSizeException if the size of the change set exceeds the allowed
limit
+ * @throws TransactionConflictException if the change set has a conflict with an overlapping
transaction
+ * @throws TransactionNotInProgressException if the transaction is not in progress;
most likely it has timed out
*/
- boolean canCommitOrThrow(Transaction tx, Collection<byte[]> changeIds) throws
TransactionFailureException;
+ void canCommitOrThrow(Transaction tx, Collection<byte[]> changeIds)
+ throws TransactionNotInProgressException, TransactionConflictException, TransactionSizeException;
--- End diff --
Replaced for canCommitOrThrow() and commitOrThrow().
---
|