Skip to content

Commit

Permalink
Merge branch '3.3' into 3.4
Browse files Browse the repository at this point in the history
  • Loading branch information
klaren committed Mar 28, 2018
2 parents adf3045 + 97eb6fc commit 6e4a4c0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ boolean isSuspended()
return true;
}

public long getLastActiveTimestamp()
long getLastActiveTimestamp()
{
return lastActiveTimestamp;
}
Expand Down Expand Up @@ -225,21 +225,23 @@ public TransactionHandle terminate( long id ) throws TransactionLifecycleExcepti
{
throw new InvalidTransactionId();
}
else
{
TransactionTerminationHandle handle = marker.getActiveTransaction().getTerminationHandle();
handle.terminate();

try
{
return acquire( id );
}
catch ( InvalidConcurrentTransactionAccess exception )
TransactionTerminationHandle handle = marker.getActiveTransaction().getTerminationHandle();
handle.terminate();

try
{
SuspendedTransaction transaction = marker.getSuspendedTransaction();
if ( registry.replace( id, marker, marker.getActiveTransaction() ) )
{
// We could not acquire the transaction. Let the other request clean up.
return null;
return transaction.transactionHandle;
}
}
catch ( InvalidConcurrentTransactionAccess exception )
{
// We could not acquire the transaction. Let the other request clean up.
}
return null;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,6 @@ public void begin__execute__rollback_concurrently() throws Exception
statement + "' } ] }" ) );
assertThat( response.status(), equalTo( 200 ) );
return response;

} );

// terminate
Expand Down

0 comments on commit 6e4a4c0

Please sign in to comment.