-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Description
Search before asking
- I searched in the issues and found nothing similar.
Version
master branch
Minimal reproduce step
When I reading the transaction code and pip-31,I found the implementation of CommandEndTxn is not as pip-31 described. Now the txn client execute commit() or abort() would wait the reponse from server until txn status become committed or aborted.
And now the callback of commit() can not reflect the actual status of txn. For example, 2 case may occur
- broker may be unavailable before server update txnstatus to committing
- broker may be unavailable between committing and committed
For case 2, may throw CoordinatorNotFound exception to client, then client would retry txn.commit(). But when broker recover, coordinator would firstly recover the previous transactions. Then broker process the retry-commit, may return InvalidTxnStatus or transactionNotFound to client, Which client would regard txn commit error, but actually it is success.
Why we don't respond success to client when server update txn-status to committing ? @congbobo184 @liangyepianzhou
What did you expect to see?
throw exception in commit.callback, but txn is success
What did you see instead?
commit.callback can reflect the accurate status
Anything else?
No response
Are you willing to submit a PR?
- I'm willing to submit a PR!

