ascherbakoff commented on a change in pull request #8205:
URL: https://github.com/apache/ignite/pull/8205#discussion_r572648639



##########
File path: 
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
##########
@@ -1038,91 +1050,108 @@ private IgniteInternalFuture updateAll0(
         final GridCacheOperation op,
         boolean async
     ) {
-        assert ctx.updatesAllowed();
+        try (MTC.TraceSurroundings ignored =
+                 
MTC.support(ctx.kernalContext().tracing().create(CACHE_API_UPDATE, 
MTC.span()))) {
+            MTC.span().addTagOrLog("cache", CACHE_API_UPDATE, () -> 
Objects.toString(cacheCfg.getName()));
 
-        ctx.checkSecurity(SecurityPermission.CACHE_PUT);
+            Map<? extends K, ? extends V> m = map;

Review comment:
       map can be declared as final in the argument list. better to log keys 
count only once:
   
   ```
   if (map != null)
   MTC.span().addTagOrLog("keys.count", CACHE_API_UPDATE,
                   () -> String.valueOf(map.size()));
   
   if (invokeMap!= null)
   MTC.span().addTagOrLog("keys.count", CACHE_API_UPDATE,
                   () -> String.valueOf(invokeMap.size()));
   ```

##########
File path: 
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
##########
@@ -1038,91 +1050,108 @@ private IgniteInternalFuture updateAll0(
         final GridCacheOperation op,
         boolean async
     ) {
-        assert ctx.updatesAllowed();
+        try (MTC.TraceSurroundings ignored =
+                 
MTC.support(ctx.kernalContext().tracing().create(CACHE_API_UPDATE, 
MTC.span()))) {
+            MTC.span().addTagOrLog("cache", CACHE_API_UPDATE, () -> 
Objects.toString(cacheCfg.getName()));
 
-        ctx.checkSecurity(SecurityPermission.CACHE_PUT);
+            Map<? extends K, ? extends V> m = map;
+            MTC.span().addTagOrLog("keys.count", CACHE_API_UPDATE,
+                () -> m == null ? "0" : String.valueOf(m.size()));
 
-        final CacheOperationContext opCtx = ctx.operationContextPerCall();
+            Map<? extends K, ? extends EntryProcessor> invokeM = invokeMap;

Review comment:
       invokeMap can be declared as final in the argument list.




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


Reply via email to