mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-12 07:04:52 +09:00
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:
1 parent
10528fbb90
commit
a32fb81273
1 file changed
+3
-2
@@ -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: {},
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user