Skip to content

Commit

Permalink
4.0.x fix: Cope with empty compacted symbol list segment written by m…
Browse files Browse the repository at this point in the history
…ore recent versions (#1597)

#### Checklist

<details>
  <summary>
   Checklist for code changes...
  </summary>
 
- [ ] Have you updated the relevant docstrings, documentation and
copyright notice?
- [ ] Is this contribution tested against [all ArcticDB's
features](../docs/mkdocs/docs/technical/contributing.md)?
- [ ] Do all exceptions introduced raise appropriate [error
messages](https://docs.arcticdb.io/error_messages/)?
 - [ ] Are API changes highlighted in the PR description?
- [ ] Is the PR labelled as enhancement or bug so it appears in
autogenerated release notes?
</details>

<!--
Thanks for contributing a Pull Request to ArcticDB! Please ensure you
have taken a look at:
- ArcticDB's Code of Conduct:
https://github.com/man-group/ArcticDB/blob/master/CODE_OF_CONDUCT.md
- ArcticDB's Contribution Licensing:
https://github.com/man-group/ArcticDB/blob/master/docs/mkdocs/docs/technical/contributing.md#contribution-licensing
-->
  • Loading branch information
muhammadhamzasajjad authored Jun 4, 2024
1 parent ccfc5e9 commit fa44557
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cpp/arcticdb/version/symbol_list.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,9 @@ bool SymbolList::can_update_symbol_list(const std::shared_ptr<Store>& store,
CollectionType& symbols) {
ARCTICDB_DEBUG(log::version(), "Reading list from storage with key {}", key);
auto key_seg = store->read(key).get().second;
if (key_seg.row_count() == 0)
return;

missing_data::check<ErrorCode::E_UNREADABLE_SYMBOL_LIST>( key_seg.descriptor().field_count() > 0,
"Expected at least one column in symbol list with key {}", key);

Expand Down

0 comments on commit fa44557

Please sign in to comment.