Skip to content

Commit

Permalink
[BugFix] fix snapshot meta upgrade compatible (StarRocks#23442)
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
luohaha authored and 王锐 committed May 17, 2023
1 parent e08958a commit 4d54ba9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions be/src/storage/snapshot_meta.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,10 @@ Status SnapshotMeta::_parse_delta_column_group(SnapshotMetaFooterPB& footer, Ran
return Status::InternalError(
fmt::format("mismatched delta column group size and segment id size, file: {}", file->filename()));
}
if (footer.dcg_offsets_size() == 0) {
// this snapshot meta is generated by low version BE.
return Status::OK();
}
// Parse delta column group
std::string buff;
const int num_dcglists = footer.dcg_offsets_size() - 1;
Expand Down

0 comments on commit 4d54ba9

Please sign in to comment.