mirror of
https://github.com/google/nomulus.git
synced 2025-07-23 19:20:44 +02:00
Improve logging/comments for commit log forks (#1464)
* Improve logging/comments for commit log forks It looks like the diff file lister is doing a second constructDiffSequence() when a commit diff file is missing from the final sequence for purely informational purposes. However, this purpose wasn't clear when investigating an actual case of this. This PR adds another warning to hopefully make the log output a bit more useful, and also promotes the "gap" log message to a warning and adds a comment indicating the purpose of the second constructDiffSequence().
This commit is contained in:
parent
efd2f4ea30
commit
01a5eadace
1 changed files with 5 additions and 1 deletions
|
@ -91,7 +91,7 @@ class GcsDiffFileLister {
|
||||||
|
|
||||||
// If we hit a gap, quit.
|
// If we hit a gap, quit.
|
||||||
if (blobInfo == null) {
|
if (blobInfo == null) {
|
||||||
logger.atInfo().log(
|
logger.atWarning().log(
|
||||||
"Gap discovered in sequence terminating at %s, missing file: %s",
|
"Gap discovered in sequence terminating at %s, missing file: %s",
|
||||||
sequence.lastKey(), filename);
|
sequence.lastKey(), filename);
|
||||||
logger.atInfo().log("Found sequence from %s to %s.", checkpointTime, lastTime);
|
logger.atInfo().log("Found sequence from %s to %s.", checkpointTime, lastTime);
|
||||||
|
@ -167,6 +167,10 @@ class GcsDiffFileLister {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (!sequence.containsKey(key)) {
|
if (!sequence.containsKey(key)) {
|
||||||
|
// Recalculate the sequence for purely informational purposes.
|
||||||
|
logger.atWarning().log(
|
||||||
|
"Fork found in commit log history. The following sequence "
|
||||||
|
+ "is disconnected from the sequence of the final commit:");
|
||||||
constructDiffSequence(gcsBucket, upperBoundTimesToBlobInfo, fromTime, key, sequence);
|
constructDiffSequence(gcsBucket, upperBoundTimesToBlobInfo, fromTime, key, sequence);
|
||||||
checkForMoreExtraDiffs = true;
|
checkForMoreExtraDiffs = true;
|
||||||
inconsistentFileSet = true;
|
inconsistentFileSet = true;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue