zhangshenghang commented on PR #12684:
URL: https://github.com/apache/seatunnel/pull/12684#issuecomment-6137694931

   Both blockers from @DanielLeens's review are addressed on head `c49b97a9`:
   
   **Issue 1 (multi-url startup failover)**: `tryInit()` now tries every 
configured node in order and starts as soon as one accepts a session — a down 
`node_urls[0]` no longer fails the sink. Sessions of unreachable nodes stay 
null and are rebuilt lazily by `writeGroup()`'s existing retry path, preserving 
the failover the old bundled multi-url session provided.
   
   **Issue 2 (redirect rotation vs unreachable nodes)**: network-level failures 
now mark a node unreachable for the current flush. Both the redirect advance 
(`nextNodeAfter`) and cached-leader lookup route around flagged nodes, so 
records no longer burn the network budget hammering a known-down node; the mark 
clears at the start of the next flush so a recovered node is probed again. The 
network budget semantics are unchanged (redirects still don't consume it).
   
   **Issue 3 (unbounded device cache)**: `deviceLeaderIndex` is now an 
access-ordered LRU bounded at 100k entries (`DEVICE_LEADER_CACHE_MAX_ENTRIES`); 
evicted devices are simply re-probed on their next write.
   
   Tests: 3 new cases (`shouldStartWhenTheFirstNodeIsDown`, 
`shouldSkipUnreachableNodeWhenFollowingRedirects`, 
`shouldBoundTheDeviceLeaderCache`); 
`shouldBackOffAndRetryOnNetworkFailureThenGiveUp` was updated to the new 
semantics — the single network failure marks the node unreachable and the 
remaining rounds traverse other endpoints, so the down node is contacted 
exactly once (budget still never enlarged by endpoint count). 
`IoTDBSinkClientTest` 10/10 green locally. Non-blocking items 4-7 remain 
follow-up 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]

Reply via email to