From 21cbee1619624aabe4933481b45d3072c5a74993 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1nos=20Benjamin=20Antal?= Date: Sun, 16 Apr 2023 19:35:21 +0200 Subject: [PATCH] Read the batch offsets only from snapshot version 15 --- src/storage/v2/durability/snapshot.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/storage/v2/durability/snapshot.cpp b/src/storage/v2/durability/snapshot.cpp index eaddb37b9..a687ccd7b 100644 --- a/src/storage/v2/durability/snapshot.cpp +++ b/src/storage/v2/durability/snapshot.cpp @@ -147,8 +147,13 @@ SnapshotInfo ReadSnapshotInfo(const std::filesystem::path &path) { info.offset_mapper = read_offset(); info.offset_epoch_history = read_offset(); info.offset_metadata = read_offset(); - info.offset_edge_batches = read_offset(); - info.offset_vertex_batches = read_offset(); + if (*version >= 15U) { + info.offset_edge_batches = read_offset(); + info.offset_vertex_batches = read_offset(); + } else { + info.offset_edge_batches = 0U; + info.offset_vertex_batches = 0U; + } } // Read metadata.