From a32fb812730bbaea24ddc2ba8681990e1ccafd6f Mon Sep 17 00:00:00 2001 From: Hornwitser Date: Wed, 22 Feb 2023 23:03:00 +0100 Subject: [PATCH] Bump LogIndex version The rename means that the log index is no longer correct. Bump the version so that its content is ignored and a new index is generated. --- packages/lib/logging_utils.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/lib/logging_utils.js b/packages/lib/logging_utils.js index 668e6d8a..be604fd6 100644 --- a/packages/lib/logging_utils.js +++ b/packages/lib/logging_utils.js @@ -140,6 +140,7 @@ class LinkTransport extends Transport { } const logFileGlob = /^[a-z]+-(\d{4}-\d{2}-\d{2})\.log$/; +const logIndexVersion = 1; /** * Keeps an index over a log directory to speed up queries to it @@ -150,7 +151,7 @@ class LogIndex { this.logDirectory = logDirectory; this.index = new Map(); - if (serialized.version !== 0) { + if (serialized.version !== logIndexVersion) { return; } @@ -166,7 +167,7 @@ class LogIndex { serialize() { let serialized = { - version: 0, + version: logIndexVersion, files: {}, };