mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-25 09:11:10 +00:00
Currently, if the user provides a cell name with too many components, we will accept it and construct an invalid clusterin key. This may result in undefined behavior down the stream. It was caught by ASAN in a debug build when executing dtest cql_tests.py:MiscellaneousCQLTester.cql3_insert_thrift_test with nodetool flush manually added after the write. Triggered during sstable writing to an MC-format sstable: seastar::shared_ptr<abstract_type const>::operator*() const at ././seastar/include/seastar/core/shared_ptr.hh:577 sstables::mc::clustering_blocks_input_range::next() const at ./sstables/mx/writer.cc:180 To prevent corrupting the state in this way, we should fail early. This patch addds validation which will fail thrift requests which attempt to create invalid clustering keys. Fixes #7568. Example error: Internal server error: Cell name of ks.test has too many components, expected 1 got 2 in 0x0004000000040000017600 Message-Id: <1605550477-24810-1-git-send-email-tgrabiec@scylladb.com>