Skip to content

Commit 1b02e68

Browse files
authored
[BugFix] fix snapshot meta upgrade compatible (#23442)
Fixes #20436 When the BE try to parse the snapshot generated by old version BE, the snapshot doesn't contain delta column in footer, so parse will fail. Signed-off-by: luohaha <[email protected]>
1 parent 12f28fb commit 1b02e68

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

be/src/storage/snapshot_meta.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,10 @@ Status SnapshotMeta::_parse_delta_column_group(SnapshotMetaFooterPB& footer, Ran
150150
return Status::InternalError(
151151
fmt::format("mismatched delta column group size and segment id size, file: {}", file->filename()));
152152
}
153+
if (footer.dcg_offsets_size() == 0) {
154+
// this snapshot meta is generated by low version BE.
155+
return Status::OK();
156+
}
153157
// Parse delta column group
154158
std::string buff;
155159
const int num_dcglists = footer.dcg_offsets_size() - 1;

0 commit comments

Comments
 (0)