IGNITE-27651 Clean up direct tx on client disconnect#7779
Merged
ptupitsyn merged 63 commits intoapache:mainfrom Mar 19, 2026
Merged
IGNITE-27651 Clean up direct tx on client disconnect#7779ptupitsyn merged 63 commits intoapache:mainfrom
ptupitsyn merged 63 commits intoapache:mainfrom
Conversation
This reverts commit 7df8d0c.
There was a problem hiding this comment.
Pull request overview
Adds server-side tracking of direct-transaction partition enlistments per client connection so that write intents/locks can be discarded when the client disconnects, and updates supporting utilities/tests/docs.
Changes:
- Expose
RemotelyTriggeredResourceRegistryviaTxManagerand wire it throughTxManagerImpl. - Track direct-tx enlistments in
ClientResourceRegistryand trigger cleanup on registry close (disconnect); refactor discard request cleanup into a helper. - Add/enable integration tests and update client-side notes/utilities related to disconnect/cleanup behavior.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| modules/transactions/src/main/java/org/apache/ignite/internal/tx/impl/TxManagerImpl.java | Stores and exposes RemotelyTriggeredResourceRegistry from TxManagerImpl. |
| modules/transactions/src/main/java/org/apache/ignite/internal/tx/TxManager.java | Adds resourceRegistry() accessor to TxManager. |
| modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/client/ItThinClientTransactionCleanupTest.java | New IT validating that locks are released after thin client disconnect. |
| modules/jdbc/src/integrationTest/java/org/apache/ignite/jdbc/ItJdbcConnectionFailoverTest.java | Re-enables a transaction failover test and updates expected error text. |
| modules/core/src/main/java/org/apache/ignite/internal/util/ExceptionUtils.java | Moves a throwable de-duplication helper into core utilities. |
| modules/client/src/test/java/org/apache/ignite/client/fakes/FakeTxManager.java | Implements new TxManager.resourceRegistry() method for test fake. |
| modules/client/src/main/java/org/apache/ignite/internal/client/tx/DEVNOTES.md | Adds documentation for client direct transaction coordinator behavior. |
| modules/client/src/main/java/org/apache/ignite/internal/client/tx/ClientTransaction.java | Updates discard behavior note when channel is lost. |
| modules/client/src/main/java/org/apache/ignite/internal/client/ClientFutureUtils.java | Uses ExceptionUtils.existingCauseOrSuppressed via static import. |
| modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/tx/ClientTxPartitionEnlistmentCleaner.java | New helper to collect and discard local write intents for enlisted partitions. |
| modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/tx/ClientTransactionDiscardRequest.java | Refactors discard logic to use ClientTxPartitionEnlistmentCleaner. |
| modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/table/ClientTableCommon.java | Adds enlistment tracking and deregistration hook on tx finish for direct mapping. |
| modules/client-handler/src/main/java/org/apache/ignite/client/handler/ClientResourceRegistry.java | Tracks tx cleaners per connection and runs cleanup on registry close (disconnect). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...handler/src/main/java/org/apache/ignite/client/handler/requests/table/ClientTableCommon.java
Show resolved
Hide resolved
...es/client-handler/src/main/java/org/apache/ignite/client/handler/ClientResourceRegistry.java
Outdated
Show resolved
Hide resolved
modules/core/src/main/java/org/apache/ignite/internal/util/ExceptionUtils.java
Show resolved
Hide resolved
...es/client-handler/src/main/java/org/apache/ignite/client/handler/ClientResourceRegistry.java
Show resolved
Hide resolved
ascherbakoff
requested changes
Mar 17, 2026
...st/java/org/apache/ignite/internal/runner/app/client/ItThinClientTransactionCleanupTest.java
Outdated
Show resolved
Hide resolved
...in/java/org/apache/ignite/client/handler/requests/tx/ClientTxPartitionEnlistmentCleaner.java
Show resolved
Hide resolved
# Conflicts: # modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/tx/ClientTransactionDiscardRequest.java
ascherbakoff
approved these changes
Mar 19, 2026
denis-chudov
approved these changes
Mar 19, 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.
Store remote enlistments in client resource registry and clean up on disconnect.
https://issues.apache.org/jira/browse/IGNITE-27651