anton-vinogradov commented on a change in pull request #9814:
URL: https://github.com/apache/ignite/pull/9814#discussion_r816973397



##########
File path: 
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/consistency/GridNearReadRepairAbstractFuture.java
##########
@@ -344,21 +352,24 @@ protected final void recordConsistencyViolation(
 
             for (KeyCacheObject key : fut.keys()) {
                 if (inconsistentKeys.contains(key)) {
-                    Map<ClusterNode, CacheConsistencyViolationEvent.EntryInfo> 
map =
-                        entries.computeIfAbsent(
-                            ctx.unwrapBinaryIfNeeded(key, !deserializeBinary, 
false, null), k -> new HashMap<>());
+                    sensitiveKeyMap.computeIfAbsent(key, k -> includeSensitive
+                        ? ctx.unwrapBinaryIfNeeded(k, !deserializeBinary, 
false, null)
+                        : "[HIDDEN_KEY#" + UUID.randomUUID() + "]");

Review comment:
       We need some unique key identification, otherwise, we'll be unable to 
mention more than one key per event.
   UUID seems to be a good choice.
   Other approaches like incremental id will lead to some inconvenience, like 
the same id at different events or the necessity to have global incremental 
value.




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