From 3f9fec98d58943b6b0765b1091869bcb2959acac Mon Sep 17 00:00:00 2001 From: Ben McIlwain Date: Fri, 2 Jul 2021 18:06:04 -0400 Subject: [PATCH] Add more logging to replay commit logs action (#1232) --- .../google/registry/backup/ReplayCommitLogsToSqlAction.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/src/main/java/google/registry/backup/ReplayCommitLogsToSqlAction.java b/core/src/main/java/google/registry/backup/ReplayCommitLogsToSqlAction.java index 108d9ca77..58ce66e44 100644 --- a/core/src/main/java/google/registry/backup/ReplayCommitLogsToSqlAction.java +++ b/core/src/main/java/google/registry/backup/ReplayCommitLogsToSqlAction.java @@ -107,6 +107,7 @@ public class ReplayCommitLogsToSqlAction implements Runnable { return; } try { + logger.atInfo().log("Beginning replay of commit logs."); replayFiles(); response.setStatus(HttpServletResponse.SC_OK); String message = "ReplayCommitLogsToSqlAction completed successfully."; @@ -126,10 +127,12 @@ public class ReplayCommitLogsToSqlAction implements Runnable { DateTime replayTimeoutTime = clock.nowUtc().plus(REPLAY_TIMEOUT_DURATION); // Start at the first millisecond we haven't seen yet DateTime fromTime = jpaTm().transact(() -> SqlReplayCheckpoint.get().plusMillis(1)); + logger.atInfo().log("Starting replay from: %s.", fromTime); // If there's an inconsistent file set, this will throw IllegalStateException and the job // will try later -- this is likely because an export hasn't finished yet. ImmutableList commitLogFiles = diffLister.listDiffFiles(fromTime, /* current time */ null); + logger.atInfo().log("Found %d new commit log files to process.", commitLogFiles.size()); int processedFiles = 0; for (GcsFileMetadata metadata : commitLogFiles) { // One transaction per GCS file