The leader_host API handler was eventually using the `req` unique_ptr after it has been already destroyed (passed down to the future lambda by reference). This was causing an occassional crash in some tests. Reworked the leader_host handler to use the req only outside of the future lambda. Also updated the code to handle the possibility that the non-default leader group (other than Group 0) might reside on a different shard than the shard 0 - using the same concept of calling on all shards via `invoke_on_all()` as done for the other requests. Fixes scylladb/scylladb#19714 Closes scylladb/scylladb#19715
4.6 KiB
4.6 KiB