yurinaryshkin commented on code in PR #11319:
URL: https://github.com/apache/ignite/pull/11319#discussion_r1571835917


##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheOffheapManager.java:
##########
@@ -1108,7 +1110,30 @@ private Metas getOrAllocateCacheMetas() throws 
IgniteCheckedException {
         try {
             int cleared = 0;
 
-            for (CacheDataStore store : cacheDataStores()) {
+            Iterable<CacheDataStore> cacheDataStores = cacheDataStores();
+
+            // Use random shift to reduce contention.
+            int shift = 
ThreadLocalRandom.current().nextInt(F.size(cacheDataStores.iterator()));
+
+            int cnt = 0;
+            for (CacheDataStore store : cacheDataStores) {

Review Comment:
   This doesn't seem to work. After executing F.size() cacheDataStores doesn't 
return elements.



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