cli: Change syncing rule for configured seeds
Instead of waiting for *all* configured/preferred seeds to be synced, we wait for at least one. Note that the previous behavior can still be used by setting `--replicas` appropriately.
This commit is contained in:
parent
e6728db15a
commit
ff79d15bb8
|
|
@ -254,9 +254,10 @@ fn announce_<R: ReadRepository>(
|
||||||
// We're done syncing when both of these conditions are met:
|
// We're done syncing when both of these conditions are met:
|
||||||
//
|
//
|
||||||
// 1. We've matched or exceeded our target replica count.
|
// 1. We've matched or exceeded our target replica count.
|
||||||
// 2. We've synced with the seeds specified manually.
|
// 2. We've synced with one of the seeds specified manually.
|
||||||
if replicas.len() >= settings.replicas
|
if replicas.len() >= settings.replicas
|
||||||
&& settings.seeds.iter().all(|s| replicas.contains_key(s))
|
&& (settings.seeds.is_empty()
|
||||||
|
|| settings.seeds.iter().any(|s| replicas.contains_key(s)))
|
||||||
{
|
{
|
||||||
ControlFlow::Break(())
|
ControlFlow::Break(())
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue