From 0f5ea8826d1cecf7addf0cfcaa5771a9839a75b2 Mon Sep 17 00:00:00 2001 From: Keuin Date: Sun, 22 Oct 2023 23:20:42 +0800 Subject: add data version field --- src/main/java/com/keuin/blame/data/entry/LogEntry.java | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/main') diff --git a/src/main/java/com/keuin/blame/data/entry/LogEntry.java b/src/main/java/com/keuin/blame/data/entry/LogEntry.java index fba04be..851316f 100644 --- a/src/main/java/com/keuin/blame/data/entry/LogEntry.java +++ b/src/main/java/com/keuin/blame/data/entry/LogEntry.java @@ -63,6 +63,12 @@ public class LogEntry { public WorldPos objectPos = WorldPos.NULL_POS; + /** + * 2: the last version of Blame 1.x (last version written natively in MongoDB) + * 3: the first version of Blame 2.x (ClickHouse) + */ + public final int dataVersion = 3; + public LogEntry() { } @@ -176,5 +182,7 @@ public class LogEntry { BinaryStreamUtils.writeFixedString(os, subjectUUID.toString(), 36); // lowercase BinaryStreamUtils.writeInt64(os, timeMillis); + + BinaryStreamUtils.writeUnsignedInt16(os, dataVersion); } } -- cgit v1.2.3