Yaniv Michael Kaul
c0bf728edb
raft/group0: fix destroy assertion on startup failure
...
If start_server_for_group0() successfully registers a server in
_raft_gr._servers but a subsequent step (e.g. enable_in_memory_state_machine())
throws, the server is never destroyed because abort_and_drain()/destroy()
check std::get_if<raft::group_id>(&_group0) which was only set after the
entire with_scheduling_group block completed.
Move _group0.emplace<raft::group_id>() inside the lambda, immediately after
start_server_for_group() succeeds, so that cleanup paths can always find
and destroy the registered server.
This fixes the assertion:
"raft_group_registry - stop(): server for group ... is not destroyed"
which manifests during shutdown after an upgrade where topology_state_load()
fails due to netw::unknown_address.
Backport: Yes, to 2026.1, 2026.2, as it causes a crash on upgrades
Refs: SCYLLADB-1217
Refs: CUSTOMER-340
Refs: CUSTOMER-335
Fixes: SCYLLADB-1809
Signed-off-by: Yaniv Kaul <yaniv.kaul@scylladb.com >
AI-assisted: Yes, Opencode/Opus 4.6
Closes scylladb/scylladb#29702
(cherry picked from commit 6179406467 )
Closes scylladb/scylladb#29742
Closes scylladb/scylladb#29754
2026-05-08 11:24:02 +02:00
..
2026-05-06 13:17:06 +02:00
2026-04-21 19:31:22 +02:00
2026-01-13 00:38:00 +01:00
2026-04-24 17:56:35 +03:00
2026-01-21 10:47:36 +02:00
2026-01-13 00:38:00 +01:00
2026-04-06 14:25:13 +03:00
2026-01-13 10:22:38 +02:00
2026-01-08 21:55:18 +02:00
2026-01-08 21:55:16 +02:00
2026-01-29 22:46:11 +02:00
2026-05-06 15:00:44 +03:00
2026-04-24 18:31:11 +03:00
2026-01-08 21:55:16 +02:00
2026-01-08 21:55:16 +02:00
2026-04-01 09:58:20 +02:00
2026-01-08 21:55:16 +02:00
2026-01-08 21:55:16 +02:00
2026-01-08 21:55:16 +02:00
2026-01-08 21:55:16 +02:00
2025-11-13 17:00:08 +01:00
2026-01-13 00:38:00 +01:00
2025-12-12 15:11:03 +02:00
2025-09-09 19:01:12 +02:00
2026-03-05 17:46:39 +02:00
2025-12-30 17:34:56 +01:00
2026-01-08 21:55:16 +02:00
2026-02-27 01:38:13 +02:00
2026-01-08 21:55:16 +02:00
2026-01-14 17:50:46 +02:00
2026-01-13 00:38:00 +01:00
2026-01-08 21:55:16 +02:00
2026-01-08 21:55:16 +02:00
2026-01-08 21:55:16 +02:00
2026-04-24 18:31:11 +03:00
2026-01-14 13:11:27 +01:00
2025-09-09 19:01:12 +02:00
2026-02-27 06:32:15 +02:00
2026-04-16 21:09:09 +03:00
2026-05-08 11:24:02 +02:00
2026-01-13 00:38:00 +01:00
2026-01-08 21:55:16 +02:00
2026-01-08 21:55:16 +02:00
2026-04-06 14:21:46 +03:00
2026-01-08 21:55:16 +02:00
2026-01-08 21:55:16 +02:00
2026-01-14 09:55:45 +01:00
2026-04-24 17:55:33 +03:00
2026-05-08 11:25:26 +03:00
2025-08-22 09:51:24 +03:00
2026-03-20 10:32:31 +02:00
2026-03-03 10:21:11 +01:00
2025-10-29 23:32:58 +01:00
2025-12-29 14:22:34 +01:00
2025-09-08 17:14:37 +02:00
2026-01-08 21:55:16 +02:00
2026-01-08 21:55:16 +02:00
2026-02-02 17:02:16 +00:00
2026-01-08 21:55:16 +02:00
2025-08-22 09:51:24 +03:00
2026-04-06 14:22:08 +03:00
2025-11-25 09:15:46 +01:00
2025-12-12 15:11:03 +02:00
2025-11-24 17:12:13 +01:00
2025-08-10 10:16:00 +02:00
2026-01-08 21:55:16 +02:00
2026-01-08 21:55:16 +02:00
2026-01-08 21:53:47 +02:00
2026-03-20 10:27:04 +02:00
2026-03-10 22:48:14 +02:00
2026-01-08 21:55:16 +02:00
2026-01-08 21:55:16 +02:00
2026-03-17 18:04:27 +01:00
2026-01-22 06:55:16 +02:00
2025-10-24 21:23:41 +03:00
2026-01-08 21:55:16 +02:00
2026-01-22 14:13:42 +03:00
2026-01-08 21:55:16 +02:00
2026-04-24 18:31:11 +03:00
2026-01-21 10:47:36 +02:00
2026-04-24 18:31:11 +03:00
2026-01-08 21:55:16 +02:00
2025-12-03 15:35:59 +01:00
2026-01-13 00:38:00 +01:00
2026-01-08 21:55:16 +02:00
2026-01-08 21:55:16 +02:00
2026-02-17 08:35:16 +01:00
2026-04-06 14:20:46 +03:00
2026-01-13 20:45:59 +02:00
2026-02-26 09:26:23 +02:00
2025-10-29 20:13:08 +02:00
2026-04-06 22:07:57 +03:00
2026-01-13 00:38:00 +01:00
2026-01-15 10:25:45 +01:00
2025-09-19 12:50:20 +03:00
2026-01-21 14:56:01 +01:00
2026-01-08 21:55:16 +02:00
2026-04-21 15:11:49 +02:00
2026-01-09 16:11:39 +08:00
2026-01-08 21:55:16 +02:00
2026-04-24 18:31:11 +03:00
2026-01-13 00:38:00 +01:00
2026-01-08 21:55:16 +02:00
2026-01-13 00:38:00 +01:00
2026-05-06 15:00:44 +03:00
2026-03-21 01:37:30 +01:00
2026-02-17 10:03:50 +01:00
2026-02-20 16:35:39 +00:00
2026-01-13 00:38:00 +01:00
2026-04-20 14:18:56 +03:00
2026-01-08 21:55:16 +02:00
2026-01-18 15:36:07 +01:00
2026-01-13 00:38:00 +01:00
2026-02-18 12:36:52 +02:00
2026-01-13 00:38:00 +01:00
2025-09-01 14:16:29 +02:00
2025-08-22 09:51:24 +03:00
2026-01-08 21:55:16 +02:00
2026-03-20 10:22:40 +02:00
2026-01-08 21:55:16 +02:00
2026-01-08 21:55:16 +02:00
2026-01-08 21:55:16 +02:00
2025-09-03 07:25:34 +03:00
2026-04-16 10:39:29 +03:00
2026-01-09 10:01:23 +02:00
2025-12-05 09:26:26 +02:00
2026-01-13 00:38:00 +01:00
2026-01-13 00:38:00 +01:00
2026-01-08 21:55:16 +02:00
2026-01-08 21:55:16 +02:00
2026-01-21 15:17:42 +01:00
2025-08-22 09:51:24 +03:00
2026-04-24 17:58:41 +03:00