deardeng commented on code in PR #67464:
URL: https://github.com/apache/doris/pull/67464#discussion_r3923377606
##########
be/src/io/cache/peer_file_cache_reader.cpp:
##########
@@ -45,6 +50,49 @@ namespace doris::io {
namespace {
+struct PeerConnectionHealth {
+ int32_t consecutive_failures = 0;
+ std::chrono::steady_clock::time_point circuit_open_until;
+ bool probe_in_flight = false;
+};
+
+// Entries are removed after a successful connection. Add expiry cleanup if
permanently
+// unavailable peer addresses accumulate.
+bthread::Mutex peer_connection_health_mutex;
+std::unordered_map<std::string, PeerConnectionHealth> peer_connection_health;
+
Review Comment:
The number of peer addresses per BE is small and bounded in practice, so the
memory impact is negligible; we prefer to keep the implementation simple and
add cleanup only if endpoint churn becomes material.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]