IGNITE-28106 .NET: Fix tx rollback to ignore connection errors#7732
Merged
ptupitsyn merged 1 commit intoapache:mainfrom Mar 9, 2026
Merged
IGNITE-28106 .NET: Fix tx rollback to ignore connection errors#7732ptupitsyn merged 1 commit intoapache:mainfrom
ptupitsyn merged 1 commit intoapache:mainfrom
Conversation
There was a problem hiding this comment.
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()inLazyTransaction.csnow catches and ignoresIgniteClientConnectionException, 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.
isapego
approved these changes
Mar 9, 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.
https://issues.apache.org/jira/browse/IGNITE-28106