apple / foundationdb

FoundationDB - the open source, distributed, transactional key-value store

Home Page:https://apple.github.io/foundationdb/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Configuration option to prefer ipv4 in DNS lookup

larshagencognite opened this issue · comments

The current ip address selection algorithm is to prefer ipv6 if any such addresses are present in the DNS lookup.

static NetworkAddress pickOneAddress(const std::vector<NetworkAddress>& addresses) {

This fails in some environments that have ipv6 addresses returned from the DNS lookup, when the network only supports ipv4. Specifically, we have hit this issue when running backups to GCS from a ipv4-only GKE cluster.

The change to prefer ipv6 was introduced in #7733, and backported to 7.1 in #7750.

It would be nice to have a knob to revert to preferring ipv4.

cherrypicked the fix #10826 to 7.1 as well.