mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-28 20:27:03 +00:00
When performing a query on a table which is accelerated by a secondary index, the paging state returned along with the query contains a partition key and a clustering key of the secondary index table. The logic wasn't prepared to handle the case of secondary indexes on static columns - notably, it tried to put base table's clustering key columns into the paging state which caused problems in other places. This commit fixes the paging logic so that the PK and CK of a secondary index table is calculated correctly. However, this solution has a major drawback: because it is impossible to encode clustering key of the base table in the paging state, partitions returned by queries accelerated by secondary indexes on static columns will _not_ be split by paging. This can be problematic in case there are large partitions in the base table. The main advantage of this fix is that it is simple. Moreover, the problem described above is not unique to static column indexes, but also happens e.g. in case of some indexes on clustering columns (see case 2 of scylladb/scylla#7432). Fixing this issue will require a more sophisticated solution and may affect more than only secondary indexes on static columns, so this is left for a followup.
108 KiB
108 KiB