Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sstables: throw at seeing invalid chunk_len
before this change, when running into a zero chunk_len, scylla crashes with `assert(chunk_size != 0)`. but we can do better than printing a backtrace like: ``` scylla: sstables/compress.cc:158: void sstables::compression::segmented_offsets::init(uint32_t): Assertion `chunk_size != 0' failed. ``` so, in this change, a `malformed_sstable_exception` is throw in place of an `assert()`, which is supposed to verify the programming invariants, not for identifying corrupted data file. Fixes #15265 Signed-off-by: Kefu Chai <kefu.chai@scylladb.com> Closes #15264
- Loading branch information