Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix unknown transaction state issues when promoting delegated transaction #1216

Merged
merged 3 commits into from
Sep 20, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Add missing logs
  • Loading branch information
cheenamalhotra committed Sep 17, 2021
commit ae58ab2c6b0ca0b75ec33aa75acfd64e8e08ffbd
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,8 @@ public byte[] Promote()
{
promoteException = e;

ADP.TraceExceptionWithoutRethrow(e);

// Doom the connection, to make sure that the transaction is
// eventually rolled back.
// VSTS 144562: doom the connection while having the lock on it to prevent race condition with "Transaction Ended" Event
Expand All @@ -187,6 +189,7 @@ public byte[] Promote()
catch (InvalidOperationException e)
{
promoteException = e;
ADP.TraceExceptionWithoutRethrow(e);
connection.DoomThisConnection();
}
}
Expand Down Expand Up @@ -367,6 +370,8 @@ public void SinglePhaseCommit(SinglePhaseEnlistment enlistment)
{
commitException = e;

ADP.TraceExceptionWithoutRethrow(e);

// Doom the connection, to make sure that the transaction is
// eventually rolled back.
// VSTS 144562: doom the connection while having the lock on it to prevent race condition with "Transaction Ended" Event
Expand All @@ -375,6 +380,7 @@ public void SinglePhaseCommit(SinglePhaseEnlistment enlistment)
catch (InvalidOperationException e)
{
commitException = e;
ADP.TraceExceptionWithoutRethrow(e);
connection.DoomThisConnection();
}
if (commitException != null)
Expand Down