You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by na...@apache.org on 2023/11/27 10:41:44 UTC

(ignite) branch master updated: IGNITE-20737 Fixed Idle verify check failing when debug logging level is set (#11052)

This is an automated email from the ASF dual-hosted git repository.

namelchev pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
     new 783cc92f0af IGNITE-20737 Fixed Idle verify check failing when debug logging level is set (#11052)
783cc92f0af is described below

commit 783cc92f0af0376c90e219ba0f6fb85481c35929
Author: EAFomin <15...@users.noreply.github.com>
AuthorDate: Mon Nov 27 13:41:34 2023 +0300

    IGNITE-20737 Fixed Idle verify check failing when debug logging level is set (#11052)
---
 .../apache/ignite/util/GridCommandHandlerTest.java  | 21 +++++++++++++++++++++
 .../cache/PartitionUpdateCounterDebugWrapper.java   |  6 ++++++
 2 files changed, 27 insertions(+)

diff --git a/modules/control-utility/src/test/java/org/apache/ignite/util/GridCommandHandlerTest.java b/modules/control-utility/src/test/java/org/apache/ignite/util/GridCommandHandlerTest.java
index f3869dbac24..a0e46a0fa1d 100644
--- a/modules/control-utility/src/test/java/org/apache/ignite/util/GridCommandHandlerTest.java
+++ b/modules/control-utility/src/test/java/org/apache/ignite/util/GridCommandHandlerTest.java
@@ -3951,6 +3951,27 @@ public class GridCommandHandlerTest extends GridCommandHandlerClusterPerMethodAb
         assertEquals(EXIT_CODE_UNEXPECTED_ERROR, execute("--warm-up", "--stop"));
     }
 
+    /** @throws Exception If fails. */
+    @Test
+    public void testCacheIdleVerifyLogLevelDebug() throws Exception {
+        IgniteEx ignite = startGrids(2);
+
+        ignite.cluster().state(ACTIVE);
+
+        IgniteCache<Object, Object> cache = ignite.createCache(new CacheConfiguration<>(DEFAULT_CACHE_NAME)
+                .setAffinity(new RendezvousAffinityFunction(false, 32))
+                .setBackups(1));
+
+        cache.put("key", "value");
+
+        injectTestSystemOut();
+
+        setLoggerDebugLevel();
+
+        assertEquals(EXIT_CODE_OK, execute("--cache", "idle_verify"));
+        assertContains(log, testOut.toString(), "no conflicts have been found");
+    }
+
     /**
      * @param ignite Ignite to execute task on.
      * @param delFoundGarbage If clearing mode should be used.
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/PartitionUpdateCounterDebugWrapper.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/PartitionUpdateCounterDebugWrapper.java
index 39aeb92b63a..54dc938b825 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/PartitionUpdateCounterDebugWrapper.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/PartitionUpdateCounterDebugWrapper.java
@@ -286,4 +286,10 @@ public class PartitionUpdateCounterDebugWrapper implements PartitionUpdateCounte
     @Override public String toString() {
         return delegate.toString();
     }
+
+    /** {@inheritDoc} */
+    @Override public boolean equals(Object o) {
+        return o instanceof PartitionUpdateCounterDebugWrapper
+                && delegate.equals(((PartitionUpdateCounterDebugWrapper)o).delegate);
+    }
 }