Skip to content

Commit b01bfc8

Browse files
luohahaMoonm3n
authored andcommitted
[BugFix] fix snapshot meta upgrade compatible (StarRocks#23442)
Fixes StarRocks#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]> Signed-off-by: Moonm3n <[email protected]>
1 parent d7e1b51 commit b01bfc8

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)