mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-25 19:10:42 +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.