mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-27 03:45:11 +00:00
When executing reversed queries, a native revered format shall be used. Therefore, the table schema and the clustering key bounds are reversed before a partition slice and a read command are constructed. It is, however, possible to run a reversed query passing a table schema but only when there are no restrictions on the clustering keys. In this particular situation, the query returns correct results. Since the current alternator tests in test.py do not imply any restrictions, this situation was not caught during development of https://github.com/scylladb/scylladb/pull/18864. Hence, additional tests are provided that add clustering keys restrictions when executing reversed queries to capture such errors earlier than in dtests. Additional manual tests were performed to test a mixed-node cluster (with alternator API enabled in Scylla on each node): 1. 2-node cluster with one node upgraded: reverse read queries performed on an old node 2. 2-node cluster with one node upgraded: reverse read queries performed on a new node 3. 2-node cluster with one node upgraded and all its sstable files deleted to trigger repair: reverse read queries performed on an old node 4. 2-node cluster with one node upgraded and all its sstable files deleted to trigger repair: reverse read queries performed on a new node All reverse read queries above consists of: - single-partition reverse reads with no clustering key restrictions, with single column restrictions and multi column restrictions both with and without paging turned on The exact same tests were also performed on a fully upgraded cluster. Fixes https://github.com/scylladb/scylladb/issues/20191 No backport is required as this is a complementary patch for the series https://github.com/scylladb/scylladb/pull/18864 that did not require backporting. Closes scylladb/scylladb#20205 * github.com:scylladb/scylladb: test_query.py: Test reverse queries with clustering key bounds alternator::do_query Add additional trace log alternator::do_query: Use native reversed format alternator::do_query Rename schema with table_schema