ascherbakoff commented on code in PR #7799:
URL: https://github.com/apache/ignite-3/pull/7799#discussion_r3058315782


##########
modules/transactions/src/main/java/org/apache/ignite/internal/tx/DeadlockPreventionPolicy.java:
##########
@@ -56,11 +59,32 @@ default long waitTimeout() {
     }
 
     /**
-     * Whether transaction priority if used for conflict resolution.
+     * Invokes fail action on the owner.
+     *
+     * @param owner The owner.
+     */
+    default void failAction(UUID owner) {
+        // No-op.
+    }
+
+    /**
+     * Tests if waiter is allowed to wait for owner.
+     *
+     * @param waiter The waiter.
+     * @param owner The owner.
+     *
+     * @return Waiter to fail or {@code null} if waiting is allowed.
+     */
+    default @Nullable Waiter allowWait(Waiter waiter, Waiter owner) {
+        return null;
+    }
+
+    /**
+     * Returns the order, in which the first conflicting waiter is searched.
      *
-     * @return Whether priority is used.
+     * @return If {@code true}, searches for older first.
      */
-    default boolean usePriority() {
-        return txIdComparator() != null;
+    default boolean reverse() {

Review Comment:
   See my previous comment for reasoning about removing "reverse" comparator.
   Yes I can, but I will prefer to have lock queue always ordered in priority 
order.
   I've renamed this method to `invertedWaitOrder` to avoid associations with 
the "reverse" comparator.



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