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_r374110007
 
 

 ##########
 File path: 
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
 ##########
 @@ -5176,6 +5198,91 @@ protected final void validateCacheKeys(Iterable<?> 
keys) {
         }
     }
 
+    /**
+     * Checks that given map is sorted or otherwise constant order, or 
processed inside deadlock-detecting transaction.
+     *
+     * Issues developer warning otherwise.
+     *
+     * @param m Map to examine.
+     */
+    protected void checkKeysOrdered(Map m, BulkOperation op) {
 
 Review comment:
   I think that method name doesn't reflect it's behavior. Moreover it actually 
doesn't check keys ordering but only check that ordered collection type or some 
internal collection is used. Also method doesn't return any value and doesn't 
throw any exception. So `check` word doesn't fit here from my point of view.
   
   What about `warnIfUnordered` name? While it still doesn't describe all 
aspects it explain our intention. 
   
   The same for version with `Collection` parameter.
   
   WDYT?

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