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 734dc16f564 IGNITE-23657 Added logging of the IdleVerify command 
(#11665)
734dc16f564 is described below

commit 734dc16f5641647c1fb52a4e2d630a29874d4b81
Author: Julia Bakulina <[email protected]>
AuthorDate: Wed Nov 27 18:17:16 2024 +0300

    IGNITE-23657 Added logging of the IdleVerify command (#11665)
---
 .../util/GridCommandHandlerInterruptCommandTest.java      | 15 +++++++++++++++
 .../management/cache/VerifyBackupPartitionsTaskV2.java    |  8 ++++++++
 2 files changed, 23 insertions(+)

diff --git 
a/modules/control-utility/src/test/java/org/apache/ignite/util/GridCommandHandlerInterruptCommandTest.java
 
b/modules/control-utility/src/test/java/org/apache/ignite/util/GridCommandHandlerInterruptCommandTest.java
index f5cc0c981de..3235e8e470a 100644
--- 
a/modules/control-utility/src/test/java/org/apache/ignite/util/GridCommandHandlerInterruptCommandTest.java
+++ 
b/modules/control-utility/src/test/java/org/apache/ignite/util/GridCommandHandlerInterruptCommandTest.java
@@ -46,6 +46,7 @@ import org.apache.ignite.testframework.LogListener;
 import org.junit.Assume;
 import org.junit.Test;
 
+import static 
org.apache.ignite.internal.commandline.CommandHandler.EXIT_CODE_OK;
 import static 
org.apache.ignite.internal.commandline.CommandHandler.EXIT_CODE_UNEXPECTED_ERROR;
 
 /**
@@ -236,8 +237,20 @@ public class GridCommandHandlerInterruptCommandTest 
extends GridCommandHandlerAb
         CountDownLatch startTaskLatch = waitForTaskEvent(ignite, 
IDLE_VERIFY_TASK_V2);
 
         LogListener lnsrValidationCancelled = LogListener.matches("The check 
procedure was cancelled.").build();
+        LogListener lnsrIdleVerifyStart = LogListener.matches("Idle verify 
procedure has started").build();
+        LogListener lnsrIdleVerifyFinish = LogListener.matches("Idle verify 
procedure has finished").build();
 
         lnsrLog.registerListener(lnsrValidationCancelled);
+        lnsrLog.registerListener(lnsrIdleVerifyStart);
+        lnsrLog.registerListener(lnsrIdleVerifyFinish);
+
+        assertEquals(EXIT_CODE_OK, execute("--cache", "idle_verify", 
"--dump"));
+
+        assertTrue(lnsrIdleVerifyStart.check());
+        assertTrue(lnsrIdleVerifyFinish.check());
+
+        lnsrIdleVerifyStart.reset();
+        lnsrIdleVerifyFinish.reset();
 
         IgniteInternalFuture fut = GridTestUtils.runAsync(() ->
             assertSame(EXIT_CODE_UNEXPECTED_ERROR, execute("--cache", 
"idle_verify")));
@@ -251,6 +264,8 @@ public class GridCommandHandlerInterruptCommandTest extends 
GridCommandHandlerAb
         assertTrue(GridTestUtils.waitForCondition(() ->
             ignite.compute().activeTaskFutures().isEmpty(), 30_000));
 
+        assertTrue(lnsrIdleVerifyStart.check());
+        assertTrue(lnsrIdleVerifyFinish.check());
         assertFalse(lnsrValidationCancelled.check());
     }
 
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/management/cache/VerifyBackupPartitionsTaskV2.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/management/cache/VerifyBackupPartitionsTaskV2.java
index 410eeb96d08..41938b6500b 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/management/cache/VerifyBackupPartitionsTaskV2.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/management/cache/VerifyBackupPartitionsTaskV2.java
@@ -212,6 +212,11 @@ public class VerifyBackupPartitionsTaskV2 extends 
ComputeTaskAdapter<CacheIdleVe
 
             Set<Integer> grpIds = getGroupIds();
 
+            if (log.isInfoEnabled()) {
+                log.info("Idle verify procedure has started [skipZeros=" + 
arg.skipZeros() + ", checkCrc=" +
+                    arg.checkCrc() + ", grpIds=" + grpIds + "]");
+            }
+
             completionCntr.set(0);
 
             List<Future<Map<PartitionKeyV2, PartitionHashRecordV2>>> 
partHashCalcFuts =
@@ -260,6 +265,9 @@ public class VerifyBackupPartitionsTaskV2 extends 
ComputeTaskAdapter<CacheIdleVe
                 }
             }
 
+            if (log.isInfoEnabled())
+                log.info("Idle verify procedure has finished.");
+
             if (!F.isEmpty(exceptions))
                 throw new IdleVerifyException(exceptions);
 

Reply via email to