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_r372385373
 
 

 ##########
 File path: modules/core/src/main/java/org/apache/ignite/IgniteCache.java
 ##########
 @@ -898,6 +902,11 @@
 
     /**
      * {@inheritDoc}
+     * <p>
+     * Keys are locked in the order in which they appear in map. It is 
caller's responsibility to
+     * make sure keys always follow same order, such as by using {@link 
TreeMap}. Using unordered map,
+     * such as {@link HashMap}, while calling this method in parallel <b>will 
lead to deadlock</b>.
 
 Review comment:
   Please add imports for `HashMap` and `TreeMap` 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