denis-chudov commented on code in PR #7304:
URL: https://github.com/apache/ignite-3/pull/7304#discussion_r2675769641
##########
modules/transactions/src/main/java/org/apache/ignite/internal/tx/impl/HeapLockManager.java:
##########
@@ -376,9 +384,12 @@ private static List<Lock> collectLocksFromStates(UUID
txId, ConcurrentLinkedQueu
* @param holder Lock holder.
* @return Lock exception.
*/
- private static LockException abandonedLockException(UUID locker, UUID
holder) {
+ private static LockException abandonedLockException(UUID locker, UUID
holder, VolatileTxStateMetaStorage storage) {
return new LockException(ACQUIRE_LOCK_ERR,
- "Failed to acquire an abandoned lock due to a possible
deadlock [locker=" + locker + ", holder=" + holder + ']');
+ format(
+ "Failed to acquire an abandoned lock due to a possible
deadlock [locker={}, holder={}]",
+ formatTxInfo(locker, storage), formatTxInfo(holder,
storage)
+ ));
Review Comment:
I would recommend replacing it with `PossibleDeadlockOnLockAcquireException`
Also, please add tx label to all logs with `Failed to acquire a lock...`,
I'd recommend to check every usage of `ACQUIRE_LOCK_ERR`.
Also, please pay attention to log that such formatting produces, it doesn't
look good (should be something like objects in square brackets):
`org.apache.ignite.internal.tx.LockException: IGN-TX-4 Failed to acquire an
abandoned lock due to a possible deadlock
[locker=txId=019ba26d-41e4-0000-0625-df6b00000001,
holder=txId=019ba26d-41b7-0000-0625-df6b00000001] TraceId:6215d97a`
--
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]