Files
scylladb/cql3/statements
Kamil Braun d93074e87e cql3: don't parallelize select aggregates to local tables
We've observed errors during shutdown like the following:
```
ERROR 2023-12-26 17:36:17,413 [shard 0:main] raft - [088f01a3-a18b-4821-b027-9f49e55c1926] applier fiber stopped because of the error: std::_Nested_exception<raft::state_machine_error> (State machine error at raft/server.cc:1230): std::runtime_error (forward_service is shutting down)
INFO  2023-12-26 17:36:17,413 [shard 0:strm] storage_service - raft_state_monitor_fiber aborted with raft::stopped_error (Raft instance is stopped)
ERROR 2023-12-26 17:36:17,413 [shard 0:strm] storage_service - raft topology: failed to fence previous coordinator raft::stopped_error (Raft instance is stopped, reason: "background error, std::_Nested_exception<raft::state_machine_error> (State machine error at raft/server.cc:1230): std::runtime_error (forward_service is shutting down)")
```

some CQL statement execution was trying to use `forward_service` during
shutdown.

It turns out that the statement is in
`system_keyspace::load_topology_state`:
```
auto gen_rows = co_await execute_cql(
    format("SELECT count(range_end) as cnt FROM {}.{} WHERE key = '{}' AND id = ?",
           NAME, CDC_GENERATIONS_V3, cdc::CDC_GENERATIONS_V3_KEY),
    gen_uuid);
```
It's querying a table in the `system` keyspace.

Pushing local table queries through `forward_service` doesn't make sense
as the data is not distributed. Excluding local tables from this logic
also fixes the shutdown error.

Fixes scylladb/scylladb#16570

Closes scylladb/scylladb#16662
2024-01-08 14:44:22 -05:00
..
2023-12-02 22:37:22 +02:00
2023-02-15 11:01:50 +02:00
2023-12-02 22:37:22 +02:00