Merge 'raft: fix send_snapshot abort_source lifetime' from Emil Maskovsky
Fix a lifetime bug where `send_snapshot()` captured `abort_source` by reference and the referenced object could be destroyed before the continuation ran. Use a gate-tracked background coroutine for each snapshot transfer: - keep abort_source on the coroutine frame (stable lifetime) - store a raw abort_source* in _snapshot_transfers for synchronous abort - erase transfer slots immediately on abort to allow same-batch reuse - close _snapshot_gate during abort() to wait for all in-flight transfers This removes the need for extra aborted-transfer bookkeeping and makes snapshot transfer shutdown and ownership semantics explicit. Fixes: SCYLLADB-1234 Refs: https://github.com/scylladb/scylladb/pull/29092 No backport: Currently the abort source parameter is not being actually used, so this doesn't cause any problems in the current and older branches. So no backport is needed (the using of abort source parameter will be eventually implemented on master afterwards). Closes scylladb/scylladb#29913 * https://github.com/scylladb/scylladb: raft: fix send_snapshot abort_source lifetime raft: fix parameter name mismatch in `send_snapshot()`
P
Patryk Jędrzejczak committed
b7fc661fa983f754ed25cd94de5dd8dd1bc9a98c