apple / foundationdb

FoundationDB - the open source, distributed, transactional key-value store
https://apple.github.io/foundationdb/
Apache License 2.0
14.6k stars 1.32k forks source link

`DatabaseConfiguration::maxZoneFailuresTolerated` should account for redundancy mode when computing availability #4970

Open sfc-gh-tclinkenbeard opened 3 years ago

sfc-gh-tclinkenbeard commented 3 years ago

If a cluster is running in three_data_hall mode, on three data halls, there is a case where losing a single zone will cause unavailability due to stuck recovery, even though in status, we see:

$ fdbcli --exec 'status json' | jq .cluster.fault_tolerance.max_zone_failures_without_losing_availability
2

The redundancy mode should be used in the availability calculation, to avoid confusing status output.

jzhou77 commented 3 years ago

Talk to @sfc-gh-etschannen before fixing this.