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 2022/02/10 16:35:31 UTC
[GitHub] [ignite] anton-vinogradov opened a new pull request #9814: IGNITE-16499 Сonsistency check command should support IGNITE_TO_STRING_INCLUDE_SENSITIVE option
anton-vinogradov opened a new pull request #9814:
URL: https://github.com/apache/ignite/pull/9814
Thank you for submitting the pull request to the Apache Ignite.
In order to streamline the review of the contribution
we ask you to ensure the following steps have been taken:
### The Contribution Checklist
- [ ] There is a single JIRA ticket related to the pull request.
- [ ] The web-link to the pull request is attached to the JIRA ticket.
- [ ] The JIRA ticket has the _Patch Available_ state.
- [ ] The pull request body describes changes that have been made.
The description explains _WHAT_ and _WHY_ was made instead of _HOW_.
- [ ] The pull request title is treated as the final commit message.
The following pattern must be used: `IGNITE-XXXX Change summary` where `XXXX` - number of JIRA issue.
- [ ] A reviewer has been mentioned through the JIRA comments
(see [the Maintainers list](https://cwiki.apache.org/confluence/display/IGNITE/How+to+Contribute#HowtoContribute-ReviewProcessandMaintainers))
- [ ] The pull request has been checked by the Teamcity Bot and
the `green visa` attached to the JIRA ticket (see [TC.Bot: Check PR](https://mtcga.gridgain.com/prs.html))
### Notes
- [How to Contribute](https://cwiki.apache.org/confluence/display/IGNITE/How+to+Contribute)
- [Coding abbreviation rules](https://cwiki.apache.org/confluence/display/IGNITE/Abbreviation+Rules)
- [Coding Guidelines](https://cwiki.apache.org/confluence/display/IGNITE/Coding+Guidelines)
- [Apache Ignite Teamcity Bot](https://cwiki.apache.org/confluence/display/IGNITE/Apache+Ignite+Teamcity+Bot)
If you need any help, please email dev@ignite.apache.org or ask anу advice on http://asf.slack.com _#ignite_ channel.
--
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: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [ignite] anton-vinogradov merged pull request #9814: IGNITE-16499 Сonsistency check command should support IGNITE_TO_STRING_INCLUDE_SENSITIVE option
Posted by GitBox <gi...@apache.org>.
anton-vinogradov merged pull request #9814:
URL: https://github.com/apache/ignite/pull/9814
--
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: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [ignite] nizhikov commented on a change in pull request #9814: IGNITE-16499 Сonsistency check command should support IGNITE_TO_STRING_INCLUDE_SENSITIVE option
Posted by GitBox <gi...@apache.org>.
nizhikov commented on a change in pull request #9814:
URL: https://github.com/apache/ignite/pull/9814#discussion_r816546968
##########
File path: modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxLocal.java
##########
@@ -2500,7 +2500,7 @@ private boolean enlistWriteEntry(GridCacheContext cacheCtx,
keepCacheObjects,
deserializeBinary,
false,
- getRes,
+ null,
Review comment:
Can you, please, clarify this change.
--
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: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [ignite] nizhikov commented on a change in pull request #9814: IGNITE-16499 Сonsistency check command should support IGNITE_TO_STRING_INCLUDE_SENSITIVE option
Posted by GitBox <gi...@apache.org>.
nizhikov commented on a change in pull request #9814:
URL: https://github.com/apache/ignite/pull/9814#discussion_r816536324
##########
File path: modules/core/src/main/java/org/apache/ignite/internal/visor/consistency/VisorConsistencyRepairTask.java
##########
@@ -117,15 +117,25 @@ protected VisorConsistencyRepairJob(VisorConsistencyRepairTaskArg arg, boolean d
log.info("Consistency check started " +
"[grp=" + grpCtx.cacheOrGroupName() + ", part=" + p + ", strategy=" + strategy + "]");
- VisorConsistencyStatusTask.MAP.put(arg, "0/" + part.fullSize());
+ StringBuilder sb = new StringBuilder();
+
+ sb.append("[node=").append(ignite.localNode());
+ sb.append(", cacheGroup=").append(grpCtx.cacheOrGroupName());
+ sb.append(", part=").append(p).append("]");
+
+ String statusKey = sb.toString();
+
+ if (VisorConsistencyStatusTask.MAP.putIfAbsent(statusKey, "0/" + part.fullSize()) != null)
+ throw new IllegalStateException("Consistency check already started " +
+ "[grp=" + grpCtx.cacheOrGroupName() + ", part=" + p + "]");
Review comment:
"]" can be replaced with ']'
--
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: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [ignite] anton-vinogradov commented on a change in pull request #9814: IGNITE-16499 Сonsistency check command should support IGNITE_TO_STRING_INCLUDE_SENSITIVE option
Posted by GitBox <gi...@apache.org>.
anton-vinogradov commented on a change in pull request #9814:
URL: https://github.com/apache/ignite/pull/9814#discussion_r816985263
##########
File path: modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxLocal.java
##########
@@ -2500,7 +2500,7 @@ private boolean enlistWriteEntry(GridCacheContext cacheCtx,
keepCacheObjects,
deserializeBinary,
false,
- getRes,
+ null,
Review comment:
The previous code was wrong but never caused the problem before the change.
Passing the getRes we'll return it to the user and in the getEntry case, the binary value will be deserialized.
But we still want to expect CacheObject at futures post-closure listeners (like on tx commit), but may gain deserialized Integer instead.
So, this just a copy-on-write fix allows us to have futures data unchanged at its listeners.
--
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: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [ignite] anton-vinogradov commented on a change in pull request #9814: IGNITE-16499 Сonsistency check command should support IGNITE_TO_STRING_INCLUDE_SENSITIVE option
Posted by GitBox <gi...@apache.org>.
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: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [ignite] anton-vinogradov commented on a change in pull request #9814: IGNITE-16499 Сonsistency check command should support IGNITE_TO_STRING_INCLUDE_SENSITIVE option
Posted by GitBox <gi...@apache.org>.
anton-vinogradov commented on a change in pull request #9814:
URL: https://github.com/apache/ignite/pull/9814#discussion_r819704656
##########
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:
This may help to guess the data, which is unacceptable.
--
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: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [ignite] anton-vinogradov commented on a change in pull request #9814: IGNITE-16499 Сonsistency check command should support IGNITE_TO_STRING_INCLUDE_SENSITIVE option
Posted by GitBox <gi...@apache.org>.
anton-vinogradov commented on a change in pull request #9814:
URL: https://github.com/apache/ignite/pull/9814#discussion_r816975945
##########
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:
UUID is just one of the possible choices here.
As I told you above, this seems to be the best choice.
The main goal is to have different values different even after masking, but the same should still be the same.
--
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: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [ignite] stepanovia commented on pull request #9814: IGNITE-16499 Сonsistency check command should support IGNITE_TO_STRING_INCLUDE_SENSITIVE option
Posted by GitBox <gi...@apache.org>.
stepanovia commented on pull request #9814:
URL: https://github.com/apache/ignite/pull/9814#issuecomment-1046812084
@anton-vinogradov , LGTM
--
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: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [ignite] nizhikov commented on a change in pull request #9814: IGNITE-16499 Сonsistency check command should support IGNITE_TO_STRING_INCLUDE_SENSITIVE option
Posted by GitBox <gi...@apache.org>.
nizhikov commented on a change in pull request #9814:
URL: https://github.com/apache/ignite/pull/9814#discussion_r816534497
##########
File path: modules/control-utility/src/test/java/org/apache/ignite/util/GridCommandHandlerConsistencyTest.java
##########
@@ -138,6 +148,26 @@ private void testAtomicAndTx(boolean incVal) throws Exception {
injectTestSystemOut();
+ LogListener lsnrUnmaskedKey = matches("Key: 0 (cache: ").build(); // Unmasked key.
+ LogListener lsnrMaskedKey = matches("Key: [HIDDEN_KEY#").build(); // Masked key.
+ LogListener lsnrMaskedVal = matches("Value: [HIDDEN_VALUE#").build(); // Masked value.
+
+ listeningLog.registerListener(lsnrUnmaskedKey);
+ listeningLog.registerListener(lsnrMaskedKey);
+ listeningLog.registerListener(lsnrMaskedVal);
+
+ List<LogListener> listeners = new ArrayList<>();
+
+ // It's unable to check just "Key:" count while https://issues.apache.org/jira/browse/IGNITE-15316 not fixed
+ if (S.includeSensitive())
Review comment:
Fix it here and in another places, also.
--
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: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [ignite] nizhikov commented on a change in pull request #9814: IGNITE-16499 Сonsistency check command should support IGNITE_TO_STRING_INCLUDE_SENSITIVE option
Posted by GitBox <gi...@apache.org>.
nizhikov commented on a change in pull request #9814:
URL: https://github.com/apache/ignite/pull/9814#discussion_r816535741
##########
File path: modules/core/src/main/java/org/apache/ignite/internal/visor/consistency/VisorConsistencyRepairTask.java
##########
@@ -117,15 +117,25 @@ protected VisorConsistencyRepairJob(VisorConsistencyRepairTaskArg arg, boolean d
log.info("Consistency check started " +
"[grp=" + grpCtx.cacheOrGroupName() + ", part=" + p + ", strategy=" + strategy + "]");
- VisorConsistencyStatusTask.MAP.put(arg, "0/" + part.fullSize());
+ StringBuilder sb = new StringBuilder();
+
+ sb.append("[node=").append(ignite.localNode());
+ sb.append(", cacheGroup=").append(grpCtx.cacheOrGroupName());
+ sb.append(", part=").append(p).append("]");
Review comment:
"]" can be replaced with ']'
--
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: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [ignite] nizhikov commented on a change in pull request #9814: IGNITE-16499 Сonsistency check command should support IGNITE_TO_STRING_INCLUDE_SENSITIVE option
Posted by GitBox <gi...@apache.org>.
nizhikov commented on a change in pull request #9814:
URL: https://github.com/apache/ignite/pull/9814#discussion_r819658011
##########
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:
> UUID seems to be a good choice.
Let's have `Arrays.hashCode(keyBytes)` for both "HIDDEN_KEY" and "HIDDEN_VALUE" logging.
--
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: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [ignite] anton-vinogradov commented on a change in pull request #9814: IGNITE-16499 Сonsistency check command should support IGNITE_TO_STRING_INCLUDE_SENSITIVE option
Posted by GitBox <gi...@apache.org>.
anton-vinogradov commented on a change in pull request #9814:
URL: https://github.com/apache/ignite/pull/9814#discussion_r816989391
##########
File path: modules/core/src/test/java/org/apache/ignite/internal/processors/cache/consistency/AbstractReadRepairTest.java
##########
@@ -77,7 +78,7 @@
private static final ConcurrentLinkedDeque<CacheConsistencyViolationEvent> evtDeq = new ConcurrentLinkedDeque<>();
/** Key. */
- protected static int iterableKey;
+ private static final AtomicInteger iterableKey = new AtomicInteger();
Review comment:
Rarely I was faced with a situation when the next test ignored this incremental key update made by the previous and fails on the initial entry update attempt (when it was already inited).
JMM provides no guarantee to sync static files, so I made it thread-safe.
Just decided to fix this at PR where I realized the issue.
--
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: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [ignite] nizhikov commented on a change in pull request #9814: IGNITE-16499 Сonsistency check command should support IGNITE_TO_STRING_INCLUDE_SENSITIVE option
Posted by GitBox <gi...@apache.org>.
nizhikov commented on a change in pull request #9814:
URL: https://github.com/apache/ignite/pull/9814#discussion_r816547867
##########
File path: modules/core/src/test/java/org/apache/ignite/internal/processors/cache/consistency/AbstractReadRepairTest.java
##########
@@ -77,7 +78,7 @@
private static final ConcurrentLinkedDeque<CacheConsistencyViolationEvent> evtDeq = new ConcurrentLinkedDeque<>();
/** Key. */
- protected static int iterableKey;
+ private static final AtomicInteger iterableKey = new AtomicInteger();
Review comment:
Can you, please, clarify this change.
--
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: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [ignite] anton-vinogradov commented on a change in pull request #9814: IGNITE-16499 Сonsistency check command should support IGNITE_TO_STRING_INCLUDE_SENSITIVE option
Posted by GitBox <gi...@apache.org>.
anton-vinogradov commented on a change in pull request #9814:
URL: https://github.com/apache/ignite/pull/9814#discussion_r816964022
##########
File path: modules/core/src/main/java/org/apache/ignite/internal/visor/consistency/VisorConsistencyRepairTask.java
##########
@@ -117,15 +117,25 @@ protected VisorConsistencyRepairJob(VisorConsistencyRepairTaskArg arg, boolean d
log.info("Consistency check started " +
"[grp=" + grpCtx.cacheOrGroupName() + ", part=" + p + ", strategy=" + strategy + "]");
- VisorConsistencyStatusTask.MAP.put(arg, "0/" + part.fullSize());
+ StringBuilder sb = new StringBuilder();
+
+ sb.append("[node=").append(ignite.localNode());
+ sb.append(", cacheGroup=").append(grpCtx.cacheOrGroupName());
+ sb.append(", part=").append(p).append("]");
Review comment:
Let's keep common style?
--
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: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [ignite] nizhikov commented on a change in pull request #9814: IGNITE-16499 Сonsistency check command should support IGNITE_TO_STRING_INCLUDE_SENSITIVE option
Posted by GitBox <gi...@apache.org>.
nizhikov commented on a change in pull request #9814:
URL: https://github.com/apache/ignite/pull/9814#discussion_r816534132
##########
File path: modules/control-utility/src/test/java/org/apache/ignite/util/GridCommandHandlerConsistencyTest.java
##########
@@ -138,6 +148,26 @@ private void testAtomicAndTx(boolean incVal) throws Exception {
injectTestSystemOut();
+ LogListener lsnrUnmaskedKey = matches("Key: 0 (cache: ").build(); // Unmasked key.
+ LogListener lsnrMaskedKey = matches("Key: [HIDDEN_KEY#").build(); // Masked key.
+ LogListener lsnrMaskedVal = matches("Value: [HIDDEN_VALUE#").build(); // Masked value.
+
+ listeningLog.registerListener(lsnrUnmaskedKey);
+ listeningLog.registerListener(lsnrMaskedKey);
+ listeningLog.registerListener(lsnrMaskedVal);
+
+ List<LogListener> listeners = new ArrayList<>();
+
+ // It's unable to check just "Key:" count while https://issues.apache.org/jira/browse/IGNITE-15316 not fixed
+ if (S.includeSensitive())
Review comment:
Square brackets required
--
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: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [ignite] nizhikov commented on a change in pull request #9814: IGNITE-16499 Сonsistency check command should support IGNITE_TO_STRING_INCLUDE_SENSITIVE option
Posted by GitBox <gi...@apache.org>.
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: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [ignite] anton-vinogradov commented on a change in pull request #9814: IGNITE-16499 Сonsistency check command should support IGNITE_TO_STRING_INCLUDE_SENSITIVE option
Posted by GitBox <gi...@apache.org>.
anton-vinogradov commented on a change in pull request #9814:
URL: https://github.com/apache/ignite/pull/9814#discussion_r816965179
##########
File path: modules/core/src/main/java/org/apache/ignite/internal/visor/consistency/VisorConsistencyRepairTask.java
##########
@@ -117,15 +117,25 @@ protected VisorConsistencyRepairJob(VisorConsistencyRepairTaskArg arg, boolean d
log.info("Consistency check started " +
"[grp=" + grpCtx.cacheOrGroupName() + ", part=" + p + ", strategy=" + strategy + "]");
- VisorConsistencyStatusTask.MAP.put(arg, "0/" + part.fullSize());
+ StringBuilder sb = new StringBuilder();
+
+ sb.append("[node=").append(ignite.localNode());
+ sb.append(", cacheGroup=").append(grpCtx.cacheOrGroupName());
+ sb.append(", part=").append(p).append("]");
+
+ String statusKey = sb.toString();
+
+ if (VisorConsistencyStatusTask.MAP.putIfAbsent(statusKey, "0/" + part.fullSize()) != null)
+ throw new IllegalStateException("Consistency check already started " +
+ "[grp=" + grpCtx.cacheOrGroupName() + ", part=" + p + "]");
Review comment:
This can be extended later, so it's a string, not a char.
Let's keep it as is?
--
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: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [ignite] anton-vinogradov commented on a change in pull request #9814: IGNITE-16499 Сonsistency check command should support IGNITE_TO_STRING_INCLUDE_SENSITIVE option
Posted by GitBox <gi...@apache.org>.
anton-vinogradov commented on a change in pull request #9814:
URL: https://github.com/apache/ignite/pull/9814#discussion_r816963266
##########
File path: modules/control-utility/src/test/java/org/apache/ignite/util/GridCommandHandlerConsistencyTest.java
##########
@@ -138,6 +148,26 @@ private void testAtomicAndTx(boolean incVal) throws Exception {
injectTestSystemOut();
+ LogListener lsnrUnmaskedKey = matches("Key: 0 (cache: ").build(); // Unmasked key.
+ LogListener lsnrMaskedKey = matches("Key: [HIDDEN_KEY#").build(); // Masked key.
+ LogListener lsnrMaskedVal = matches("Value: [HIDDEN_VALUE#").build(); // Masked value.
+
+ listeningLog.registerListener(lsnrUnmaskedKey);
+ listeningLog.registerListener(lsnrMaskedKey);
+ listeningLog.registerListener(lsnrMaskedVal);
+
+ List<LogListener> listeners = new ArrayList<>();
+
+ // It's unable to check just "Key:" count while https://issues.apache.org/jira/browse/IGNITE-15316 not fixed
+ if (S.includeSensitive())
Review comment:
Done
--
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: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org