Skip to content

Commit

Permalink
Issue error message when no 'next_column_id' in table_entry (#1910)
Browse files Browse the repository at this point in the history
### What problem does this PR solve?

In 0.4.0-dev2, we introduce next_column_id in table entry, if user try
to load the catalog file before 0.4.0-dev2. Infinity will exit without
proper error message.

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)

Signed-off-by: Jin Hai <[email protected]>
  • Loading branch information
JinHai-CN authored Sep 24, 2024
1 parent dcefb87 commit 1cc4ea6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/storage/meta/entry/table_entry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1219,6 +1219,11 @@ UniquePtr<TableEntry> TableEntry::Deserialize(const nlohmann::json &table_entry_
TxnTimeStamp begin_ts = table_entry_json["begin_ts"];
SegmentID unsealed_id = table_entry_json["unsealed_id"];
SegmentID next_segment_id = table_entry_json["next_segment_id"];

if(!table_entry_json.contains("next_column_id")) {
String error_message = "No 'next_column_id in table entry of catalog file, maybe your catalog is generated before 0.4.0.'";
UnrecoverableError(error_message);
}
ColumnID next_column_id = table_entry_json["next_column_id"];

UniquePtr<TableEntry> table_entry = MakeUnique<TableEntry>(deleted,
Expand Down

0 comments on commit 1cc4ea6

Please sign in to comment.