mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-22 17:40:34 +00:00
In #8772, an assert validating first token <= last token failed in leveled_manifest::overlapping. It is unclear how we got to that state, so add validation in sstable::set_first_and_last_keys() that the to-be-set first and last keys are well ordered. Otherwise, throw malformed_sstable_exception. set_first_and_last_keys is called both on the write path from the sstable writer before the sstable is sealed, and on the open/load path via update_info_for_opened_data(). This series also fixes issues with unit tests with regards to first/last keys so they won't fail the validation. Refs #8772 Test: unit(dev) DTest: next-gating(dev), materialized_views_test:TestMaterializedViews.interrupt_build_process_and_resharding_half_to_max_test(debug) * tag 'validate-first-and-last-keys-ordering-v1': sstable: validate first and last keys ordering test: lib: reusable_sst: save unexpected errors test: sstable_datafile_test: stcs_reshape_test: use token_generation_for_current_shard test: sstable_test: define primary key in schema for compressed sstable