github-actions[bot] commented on code in PR #69423:
URL: https://github.com/apache/doris/pull/69423#discussion_r4346329056


##########
be/src/util/dns_cache.cpp:
##########
@@ -46,12 +47,25 @@ DNSCache::~DNSCache() {
     }
 }
 
+void DNSCache::invalidate(const std::string& hostname) {
+    std::unique_lock<std::shared_mutex> lock(mutex);
+    // ECONNRESET/EPIPE do not prove the cached IP is obsolete. Keep the 
fallback
+    // and DNS failure history; only fresh DNS or normal authoritative 
eviction replaces it.
+    if (cache.count(hostname) != 0) {

Review Comment:
   [P2] Preserve invalidation during a cold DNS retry
   
   After authoritative eviction, a VNodeChannel can still retain its old shared 
stub. Once the negative TTL expires, another acquisition can start a cold DNS 
retry while that old channel completes with a network fault. With no positive 
cache entry, this condition drops the newer refresh request and only erases the 
retry tombstone. If the earlier DNS lookup then fails, 
`_remember_unresolvable()` reinstalls a fresh tombstone, so subsequent 
acquisitions skip DNS for another 60 seconds by default even when the 
replacement pod is now resolvable; no RPC is sent to trigger another refresh. 
Retain invalidations for active cold lookups and fence negative-result 
publication against them (a pending marker alone cannot bypass `get()`'s 
negative-cache fast path). This is distinct from the existing populated-cache 
background-eviction thread: that path is fenced by `_erase_if_still_failing()`, 
while this tombstone is published by `_remember_unresolvable()`. Add a 
latch-controlled cold-retry/fault-c
 allback test.



-- 
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]

Reply via email to