fix NXDOMAIN issue showing up as no non-zero-weighted sources

The suspension logic changed things so that we'd trip over a DNS
resolution earlier than normal, inside the round robin routine.

That isn't capable of reporting the domain resolution issue and
it would bubble up as NoSources and we'd miscategorize the failure.

This commit addresses that by allowing the round robin to pick a
source and then we can subsequently bubble up and handle the domain
resolution issue as normal.
This commit is contained in:
Wez Furlong
2023-06-24 10:13:47 -07:00
parent 3b681e6616
commit d8174deb2d
+11
View File
@@ -378,6 +378,17 @@ impl EgressPoolRoundRobin {
entries.push(entry.clone());
}
}
} else {
// Likely a DNS resolution issue that prevented us from computing
// the site name to use for the ready queue.
// We're not in an appropriate context to handle that issue here,
// but the good news is that without a valid site name, there can't
// possibly be any suspensions for a ready queue that we can't name
// so we can continue to populate the entries and pick one.
// The DNS issue will bubble up almost immediately after we return
// a source name as our caller will call
// ReadyQueueManager::resolve_by_queue_name which will surface it.
entries.push(entry.clone());
}
}