agura commented on a change in pull request #6976: IGNITE-6804 Warning if 
unordered map used in locking cache operation.
URL: https://github.com/apache/ignite/pull/6976#discussion_r372385696
 
 

 ##########
 File path: modules/core/src/main/java/org/apache/ignite/IgniteCache.java
 ##########
 @@ -1099,6 +1112,11 @@
 
     /**
      * {@inheritDoc}
+     * <p>
+     * Keys are locked in the order in which they appear in key set. It is 
caller's responsibility to
+     * make sure keys always follow same order, such as by using {@link 
TreeSet}. Using unordered map,
+     * such as {@link HashSet}, while calling this method in parallel <b>will 
lead to deadlock</b>.
 
 Review comment:
   Please add imports for `HashSet` and `TreeSet` or use fully qualified name.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to