Skip to content

IGNITE-28106 .NET: Fix tx rollback to ignore connection errors#7732

Merged
ptupitsyn merged 1 commit intoapache:mainfrom
ptupitsyn:ignite-28106
Mar 9, 2026
Merged

IGNITE-28106 .NET: Fix tx rollback to ignore connection errors#7732
ptupitsyn merged 1 commit intoapache:mainfrom
ptupitsyn:ignite-28106

Conversation

@ptupitsyn
Copy link
Contributor

@ptupitsyn ptupitsyn commented Mar 9, 2026

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

This PR fixes the .NET thin client's transaction rollback to gracefully handle connection errors instead of throwing exceptions. When the client connection is closed before a rollback is attempted, the server will automatically roll back the transaction (due to session timeout), so the client-side IgniteClientConnectionException can be safely ignored.

Changes:

  • RollbackAsync() in LazyTransaction.cs now catches and ignores IgniteClientConnectionException, since a connection loss means the server already rolled back the transaction.
  • Added a test verifying that calling RollbackAsync() on a transaction after the client connection is disposed does not throw.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
modules/platforms/dotnet/Apache.Ignite/Internal/Transactions/LazyTransaction.cs Wraps rollback logic in try-catch to ignore IgniteClientConnectionException, with guard clause refactoring
modules/platforms/dotnet/Apache.Ignite.Tests/Transactions/TransactionsTests.cs Adds integration test verifying rollback on a closed connection does not throw

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ptupitsyn ptupitsyn merged commit 3acbf3e into apache:main Mar 9, 2026
9 checks passed
@ptupitsyn ptupitsyn deleted the ignite-28106 branch March 9, 2026 12:21
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.

3 participants