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.
This commit is contained in:
Hornwitser committed 2023-02-23 00:12:48 +01:00
1 parent 10528fbb90
commit a32fb81273
1 file changed
+3 -2
+3 -2
View File
@@ -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: {},
};