rakeshadr commented on PR #10473:
URL: https://github.com/apache/ozone/pull/10473#issuecomment-4714913409

   Adding sequence-diagram to understand high-level view of IP address change 
issue and the recovery execution path implemented in this PR.
   
   _Pre-Fix Flow (Sequence Diagram):-_
   ```
   Ozone Component Core            InetSocketAddress           OS TCP Layer     
         Network Plane
          |                                |                        |           
               |
          |-- 1. Get Target Connection --->|                        |           
               |
          |<- 2. Returns Frozen IP --------|                        |           
               |
          |                                                         |           
               |
          |-- 3. Dial Request (connect()) ------------------------->|           
               |
          |                                                         |-- 4. Send 
TCP SYN ------>|
          |                                                         |      (To 
Old IP Location)|---> [DEAD ENDPOINT]
          |                                                         |           
               |     (Drops or Resets)
          |                                                         |<-- 5. No 
Response/RST ---|
          |<-- 6. Connect Timeout / SocketException ----------------|
          |
          |-- 7. Retry Loop Initiated (Bypasses Name Resolution) ---> [Loops 
back to Step 1, Dialing Dead IP]
   ```
   
   _Post-Fix Recovery Flow (Sequence Diagram):-_
   ```
   Component Engine          ConnectionFailureUtils         
SCMConnectionManager          StateContext             Target Peer
          |                            |                              |         
                |                       |
          |-- 1. Heartbeat/RPC Call 
------------------------------------------------------------------------------>X
 [Old IP - Fails]
          |<- 2. Throws SocketTimeoutException / ConnectException 
------------------------------------------------|
          |
          |-- 3. isConnectionFailure(ex)? -->|
          |<-- 4. Returns TRUE --------------|
          |
          |-- 5. Force Refresh -------------------------------------->|
          |                                                           |-- 6. 
Re-resolve Host -->| (DNS Lookup)
          |                                                           |<- 7. 
Returns New IP ----|
          |                                                           |
          |                                                           |-- 8. 
Swap Endpoint ---->| [Phase 1: PUBLISH]
          |                                                           |         
                | (Creates New Queue)
          |                                                           |         
                |
          |                                                           |-- 9. 
Update Registry -->| [Phase 2: SWITCH]
          |                                                           |         
                | (Swaps Keys Under Lock)
          |                                                           |         
                |
          |                                                           |-- 10. 
Purge Stale ----->| [Phase 3: RETIRE]
          |                                                           |         
                 (Cleans Old Address)
          |
          |-- 11. Next Attempt (Dials Reconstructed Proxy) 
------------------------------------------------------------>| [New IP Location]
          |<-- 12. 200 OK Connection Established (Handshake Renewed) 
----------------------------------------------------|
   ```


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