ascherbakoff commented on code in PR #7799:
URL: https://github.com/apache/ignite-3/pull/7799#discussion_r3062461963
##########
modules/transactions/src/main/java/org/apache/ignite/internal/tx/impl/HeapLockManager.java:
##########
@@ -144,6 +155,28 @@ private static int intProperty(SystemLocalConfiguration
systemProperties, String
return property == null ? defaultValue :
Integer.parseInt(property.propertyValue());
}
+ private Exception resolveTransactionSealedException(UUID txId) {
+ TxStateMeta meta = txStateVolatileStorage.state(txId);
+ Throwable cause = meta == null ? null : meta.lastException();
+ boolean isFinishedDueToTimeout = meta != null &&
meta.isFinishedDueToTimeoutOrFalse();
+ boolean isFinishedDueToError = meta != null && !isFinishedDueToTimeout
&& meta.lastExceptionErrorCode() != null;
+ Throwable publicCause = isFinishedDueToError ? cause : null;
+ Integer causeErrorCode = meta == null ? null :
meta.lastExceptionErrorCode();
+
+ return new TransactionException(
+ finishedTransactionErrorCode(isFinishedDueToTimeout,
isFinishedDueToError),
+ format("{} [{}, txState={}].",
+ finishedTransactionErrorMessage(
Review Comment:
I've noticed with myself.
https://issues.apache.org/jira/browse/IGNITE-28506
##########
modules/transactions/src/main/java/org/apache/ignite/internal/tx/impl/HeapLockManager.java:
##########
@@ -144,6 +155,28 @@ private static int intProperty(SystemLocalConfiguration
systemProperties, String
return property == null ? defaultValue :
Integer.parseInt(property.propertyValue());
}
+ private Exception resolveTransactionSealedException(UUID txId) {
+ TxStateMeta meta = txStateVolatileStorage.state(txId);
+ Throwable cause = meta == null ? null : meta.lastException();
+ boolean isFinishedDueToTimeout = meta != null &&
meta.isFinishedDueToTimeoutOrFalse();
+ boolean isFinishedDueToError = meta != null && !isFinishedDueToTimeout
&& meta.lastExceptionErrorCode() != null;
+ Throwable publicCause = isFinishedDueToError ? cause : null;
+ Integer causeErrorCode = meta == null ? null :
meta.lastExceptionErrorCode();
+
+ return new TransactionException(
+ finishedTransactionErrorCode(isFinishedDueToTimeout,
isFinishedDueToError),
+ format("{} [{}, txState={}].",
+ finishedTransactionErrorMessage(
Review Comment:
I've noticed this myself.
https://issues.apache.org/jira/browse/IGNITE-28506
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]