IGNITE-27947 Fix rollback for client piggyback tx#7844
Merged
ptupitsyn merged 20 commits intoapache:mainfrom Apr 22, 2026
Merged
IGNITE-27947 Fix rollback for client piggyback tx#7844ptupitsyn merged 20 commits intoapache:mainfrom
ptupitsyn merged 20 commits intoapache:mainfrom
Conversation
** Code should be very similar to ClientTable
* The first request is tracked for direct transactions. * The first request id is passed on the Rollback message using the negative range of the resourceId field.
Contributor
Author
|
This should be a simpler implementation than the one on the previous approach. |
ptupitsyn
reviewed
Mar 23, 2026
** Postpone removal of firstReqToTx resource to after the transaction is commited/rolled back. ** Added test
ptupitsyn
reviewed
Mar 30, 2026
** Fixed type ** Updated javadoc comment on ClientInboundMessageHandler ** Added IGNITE-28405 ticket mention
…andling logic. (For the most part anyway) ** The code is still very hard, its just a little less duplicated.
# Conflicts: # modules/client-common/src/main/java/org/apache/ignite/internal/client/proto/ProtocolBitmaskFeature.java # modules/client-handler/src/main/java/org/apache/ignite/client/handler/ClientHandlerModule.java # modules/client/src/main/java/org/apache/ignite/internal/client/TcpClientChannel.java
ptupitsyn
reviewed
Apr 3, 2026
ptupitsyn
requested changes
Apr 3, 2026
Contributor
Author
|
Since https://issues.apache.org/jira/browse/IGNITE-24963 it's already around the corner, we decided to postpone this merge until then. |
Contributor
Author
|
The other branch has been unlocked. I'll merge the changes and apply the last round of reviews. |
** Resolved typo.
# Conflicts: # modules/client-handler/src/main/java/org/apache/ignite/client/handler/ClientInboundMessageHandler.java # modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/sql/ClientSqlQueryMetadataRequest.java # modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/table/ClientTableCommon.java # modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/table/ClientTupleContainsAllKeysRequest.java # modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/table/ClientTupleContainsKeyRequest.java # modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/table/ClientTupleDeleteAllExactRequest.java # modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/table/ClientTupleDeleteAllRequest.java # modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/table/ClientTupleDeleteExactRequest.java # modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/table/ClientTupleDeleteRequest.java # modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/table/ClientTupleGetAllRequest.java # modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/table/ClientTupleGetAndDeleteRequest.java # modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/table/ClientTupleGetAndReplaceRequest.java # modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/table/ClientTupleGetAndUpsertRequest.java # modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/table/ClientTupleGetRequest.java # modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/table/ClientTupleInsertAllRequest.java # modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/table/ClientTupleInsertRequest.java # modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/table/ClientTupleReplaceExactRequest.java # modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/table/ClientTupleReplaceRequest.java # modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/table/ClientTupleUpsertAllRequest.java # modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/table/ClientTupleUpsertRequest.java # modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/table/ClientTuplesRequestBase.java
ptupitsyn
reviewed
Apr 21, 2026
ptupitsyn
reviewed
Apr 21, 2026
…conditions ** This solution creates much more contention but will safeguard against all known race-conditions at this time between the two rollback mechanisms.
** Remove useless comment
** Also formatted code.
# Conflicts: # modules/client/src/integrationTest/java/org/apache/ignite/internal/client/ItThinClientTransactionsTest.java
ptupitsyn
approved these changes
Apr 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Allow rollback for piggyback transactions: piggyback client tx combines transaction start with table operation in one client request. If the table operation is stuck on a lock, the client never receives the transaction id. Instead, we use the
requestId(generated on the client) to rollback the transaction.TX_ROLLBACKaccepts a request id of the first request ("piggyback") of a direct mapped TX. Request Id is encoded in the negative range ofresourceId.requestId -> txIdto roll back piggyback transactions stuck on a lockonSentcallbacks on the payload output object.ClientLazyTransactionabout the first request in the TX, update viaPayloadOutputChannelon successful request.TX_ROLLBACKbased onfirstReqIdhttps://issues.apache.org/jira/browse/IGNITE-27947