Lalant commented on code in PR #7304:
URL: https://github.com/apache/ignite-3/pull/7304#discussion_r2731338915


##########
modules/transactions/src/main/java/org/apache/ignite/internal/tx/PossibleDeadlockOnLockAcquireException.java:
##########
@@ -32,18 +34,25 @@ public class PossibleDeadlockOnLockAcquireException extends 
LockException {
      * @param currentLockHolderTxId UUID of a transaction that currently holds 
the lock.
      * @param attemptedLockModeToAcquireWith {@link LockMode} that was tried 
to acquire the lock with but failed the attempt.
      * @param currentlyAcquiredLockMode {@link LockMode} of the lock that is 
already acquired with.
+     * @param abandonedLock flag which shows the status of the lock. If the 
state is uncertain, it's treated as abandoned.
+     * @param txStateMetaStorage txState required to properly log tx labels.
      */
     public PossibleDeadlockOnLockAcquireException(
             UUID failedToAcquireLockTxId,
             UUID currentLockHolderTxId,
             LockMode attemptedLockModeToAcquireWith,
-            LockMode currentlyAcquiredLockMode
+            LockMode currentlyAcquiredLockMode,
+            boolean abandonedLock,
+            VolatileTxStateMetaStorage txStateMetaStorage
     ) {
         super(
                 ACQUIRE_LOCK_ERR,
-                "Failed to acquire a lock due to a possible deadlock ["
-                        + "failedToAcquireLockTransactionId=" + 
failedToAcquireLockTxId
-                        + ", currentLockHolderTransactionId=" + 
currentLockHolderTxId
+                "Failed to acquire " + (abandonedLock ? "the abandoned " : "a 
")
+                        + "lock due to a possible deadlock ["
+                        + "failedToAcquireLockTransactionId txn "

Review Comment:
   Fixed.



##########
modules/transactions/src/main/java/org/apache/ignite/internal/tx/PossibleDeadlockOnLockAcquireException.java:
##########
@@ -32,18 +34,25 @@ public class PossibleDeadlockOnLockAcquireException extends 
LockException {
      * @param currentLockHolderTxId UUID of a transaction that currently holds 
the lock.
      * @param attemptedLockModeToAcquireWith {@link LockMode} that was tried 
to acquire the lock with but failed the attempt.
      * @param currentlyAcquiredLockMode {@link LockMode} of the lock that is 
already acquired with.
+     * @param abandonedLock flag which shows the status of the lock. If the 
state is uncertain, it's treated as abandoned.
+     * @param txStateMetaStorage txState required to properly log tx labels.
      */
     public PossibleDeadlockOnLockAcquireException(
             UUID failedToAcquireLockTxId,
             UUID currentLockHolderTxId,
             LockMode attemptedLockModeToAcquireWith,
-            LockMode currentlyAcquiredLockMode
+            LockMode currentlyAcquiredLockMode,
+            boolean abandonedLock,
+            VolatileTxStateMetaStorage txStateMetaStorage
     ) {
         super(
                 ACQUIRE_LOCK_ERR,
-                "Failed to acquire a lock due to a possible deadlock ["
-                        + "failedToAcquireLockTransactionId=" + 
failedToAcquireLockTxId
-                        + ", currentLockHolderTransactionId=" + 
currentLockHolderTxId
+                "Failed to acquire " + (abandonedLock ? "the abandoned " : "a 
")
+                        + "lock due to a possible deadlock ["
+                        + "failedToAcquireLockTransactionId txn "
+                        + formatTxInfo(failedToAcquireLockTxId, 
txStateMetaStorage)
+                        + ", currentLockHolderTransactionId txn"

Review Comment:
   Fixed.



-- 
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]

Reply via email to