nizhikov commented on a change in pull request #9814:
URL: https://github.com/apache/ignite/pull/9814#discussion_r816544421
##########
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:
Why do we need random UUID here?
##########
File path:
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/consistency/GridNearReadRepairAbstractFuture.java
##########
@@ -388,6 +398,58 @@ protected final void recordConsistencyViolation(
strategy));
}
+ /**
+ *
+ */
+ private Object sensitiveValue(boolean includeSensitive, EntryGetResult res,
+ Map<ByteArrayWrapper, Object> sensitiveValMap) {
+ if (res != null) {
+ CacheObject val = res.value();
+
+ try {
+ ByteArrayWrapper wrapped = new
ByteArrayWrapper(val.valueBytes(ctx.cacheObjectContext()));
+
+ return sensitiveValMap.computeIfAbsent(wrapped, w ->
+ includeSensitive ?
+ ctx.unwrapBinaryIfNeeded(val, !deserializeBinary,
false, null) :
+ "[HIDDEN_VALUE#" + UUID.randomUUID() + "]");
Review comment:
Why do we need random UUID here?
--
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]