Skip to content

IGNITE-27651 Clean up direct tx on client disconnect#7779

Merged
ptupitsyn merged 63 commits intoapache:mainfrom
ptupitsyn:ignite-27651
Mar 19, 2026
Merged

IGNITE-27651 Clean up direct tx on client disconnect#7779
ptupitsyn merged 63 commits intoapache:mainfrom
ptupitsyn:ignite-27651

Conversation

@ptupitsyn
Copy link
Contributor

@ptupitsyn ptupitsyn commented Mar 13, 2026

Store remote enlistments in client resource registry and clean up on disconnect.

https://issues.apache.org/jira/browse/IGNITE-27651

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 RemotelyTriggeredResourceRegistry via TxManager and wire it through TxManagerImpl.
  • Track direct-tx enlistments in ClientResourceRegistry and 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.

ptupitsyn and others added 3 commits March 16, 2026 10:43
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@ptupitsyn ptupitsyn requested a review from ascherbakoff March 16, 2026 10:56
@ptupitsyn ptupitsyn merged commit 3eb5090 into apache:main Mar 19, 2026
5 checks passed
@ptupitsyn ptupitsyn deleted the ignite-27651 branch March 19, 2026 12:55
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.

4 participants