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 2021/09/03 13:03:59 UTC

[GitHub] [ignite] xtern commented on a change in pull request #9373: IGNITE-15427 Improve the snapshot procedure logging

xtern commented on a change in pull request #9373:
URL: https://github.com/apache/ignite/pull/9373#discussion_r701863707



##########
File path: modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/SnapshotFutureTask.java
##########
@@ -394,7 +394,14 @@ public boolean start() {
 
         if (withMetaStorage) {
             try {
+                long start = U.currentTimeMillis();
+
                 U.get(((DistributedMetaStorageImpl)cctx.kernalContext().distributedMetastorage()).flush());
+
+                if (log.isInfoEnabled()) {
+                    log.info("Finished waiting for all the concurrent operations over the metadata store before snapshot " +
+                        "[snapName=" + snpName + ", time=" + (U.currentTimeMillis() - start) + "ms]");

Review comment:
       "[**snpName**=...

##########
File path: modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/IgniteSnapshotManager.java
##########
@@ -1420,7 +1420,14 @@ public static boolean isSnapshotOperation(DiscoveryEvent evt) {
 
             // Schedule task on a checkpoint and wait when it starts.
             try {
+                long start = U.currentTimeMillis();
+
                 task.started().get();
+
+                if (log.isInfoEnabled()) {
+                    log.info("Finished waiting for synchronized checkpoint under topology lock " +

Review comment:
       Finished waiting for **a** synchronized checkpoint under topology lock 

##########
File path: modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/SnapshotFutureTask.java
##########
@@ -518,8 +525,11 @@ else if (affNode && missed.isEmpty() && cctx.kernalContext().query().moduleEnabl
         // Submit all tasks for partitions and deltas processing.
         List<CompletableFuture<Void>> futs = new ArrayList<>();
 
-        if (log.isInfoEnabled())
-            log.info("Submit partition processing tasks with partition allocated lengths: " + partFileLengths);
+        if (log.isInfoEnabled()) {
+            log.info("Submit partition processing tasks to the snapshot execution pool " +
+                "[map=" + convert(partFileLengths.keySet()) +
+                ", totalSizes=" + U.humanReadableByteCount(partFileLengths.values().stream().mapToLong(v -> v).sum()) + ']');

Review comment:
       totalSize?

##########
File path: modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/SnapshotFutureTask.java
##########
@@ -452,16 +459,16 @@ public boolean start() {
                     if (!missed.isEmpty()) {
                         throw new IgniteCheckedException("Snapshot operation cancelled due to " +
                             "not all of requested partitions has OWNING state on local node [grpId=" + grpId +
-                            ", missed" + missed + ']');
+                            ", missed" + S.compact(missed) + ']');

Review comment:
       ", missed=...

##########
File path: modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/IgniteSnapshotManager.java
##########
@@ -1420,7 +1420,14 @@ public static boolean isSnapshotOperation(DiscoveryEvent evt) {
 
             // Schedule task on a checkpoint and wait when it starts.
             try {
+                long start = U.currentTimeMillis();
+
                 task.started().get();
+
+                if (log.isInfoEnabled()) {
+                    log.info("Finished waiting for synchronized checkpoint under topology lock " +
+                        "[snapName=" + task.snapshotName() + ", time=" + (U.currentTimeMillis() - start) + "ms]");

Review comment:
       "[**snpName**=...

##########
File path: modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/SnapshotFutureTask.java
##########
@@ -683,6 +693,20 @@ private Runnable wrapExceptionIfStarted(IgniteThrowableRunner exec) {
         return true;
     }
 
+    /**
+     * @param grps List of processing pairs.
+     * @return Map of cache group id their partitions compacted by {@link S#compact(Collection)}.
+     */
+    private static Map<Integer, String> convert(Collection<GroupPartitionId> grps) {

Review comment:
       compactGroupPartitions?




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