You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2020/09/01 14:20:16 UTC
[GitHub] [ignite] sanpwc opened a new pull request #8205: IGNITE-13393
sanpwc opened a new pull request #8205:
URL: https://github.com/apache/ignite/pull/8205
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [ignite] sanpwc commented on a change in pull request #8205: IGNITE-13393
Posted by GitBox <gi...@apache.org>.
sanpwc commented on a change in pull request #8205:
URL: https://github.com/apache/ignite/pull/8205#discussion_r600635373
##########
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:
Fixed.
##########
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:
Fixed.
--
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:
users@infra.apache.org
[GitHub] [ignite] ascherbakoff commented on a change in pull request #8205: IGNITE-13393
Posted by GitBox <gi...@apache.org>.
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:
users@infra.apache.org