mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-28 18:50:53 +00:00
We add a `peers()` method to `discovery` which returns the peers discovered until now (including seeds). The caller of functions which return an output -- `tick` or `request` -- is responsible for persisting `peers()` before returning the output of `tick`/`request` (e.g. before sending the response produced by `request` back). The user of `discovery` is also responsible for restoring previously persisted peers when constructing `discovery` again after a restart (e.g. if we previously crashed in the middle of the algorithm). The `persistent_discovery` class is a wrapper around `discovery` which does exactly that. For storage we use a simple local table. A simple bugfix is also included in the first patch. * kbr/discovery-persist-v3: service: raft: raft_group0: persist discovered peers and restore on restart db: system_keyspace: introduce discovery table service: raft: discovery: rename `get_output` to `tick` service: raft: discovery: stop returning peer_list from `request` after becoming leader