What is default value for UseLocalitiesForExclusion?

According to cluster_spec.md documentation, “the UseLocalitiesForExclusion is set to false by default.”
On the other hand, this PR suggests that “locality based exclusions are turned on per default.”
Also foundationdbcluster_types.go says “// UseLocalitiesForExclusion returns the value of UseLocalitiesForExclusion or true if unset.”

Which is correct?

I wonder, because I set up a new test cluster with the new 2.34.0 operator, and I found both exclusion types present

`` fdb> exclude
There are currently 3 servers or localities being excluded from the database:
10.100.8.111
locality_instance_id:log-46861
locality_instance_id:storage-5966
To find out whether it is safe to remove one or more of these
servers from the cluster, type exclude <addresses>'. To return one of these servers to the cluster, type include '.

There are currently 0 servers or localities marked as failed in the database:
fdb> ``

I had not set the parameter. The exclusions worked as intended

Yeah, the docs are outdated, for those versions:

	SupportsLocalityBasedExclusions71: Version{api.Version{Major: 7, Minor: 1, Patch: 42}},
	SupportsLocalityBasedExclusions:   Version{api.Version{Major: 7, Minor: 3, Patch: 26}},

The locality-based exclusions are enabled per default. For log or transaction processes it is expected that the IP addresses are used in the exclusion in addition to the locality-based exclusion to make sure that it is safe to remove this log/transaction process, even if it it not running anymore: fdb-kubernetes-operator/internal/removals/remove.go at main · FoundationDB/fdb-kubernetes-operator · GitHub.

1 Like