masaori335 opened a new pull request, #13092:
URL: https://github.com/apache/trafficserver/pull/13092

   # Summary
   
   Replaces the "alive/dead/ombie" terminology in HostDBInfo with an explicit 
three-state model, "up/down/suspect", and cleans up the API surface.
   
   # HostDBInfo State
   
   | State   | Description                                                      
                |
   
|---------|----------------------------------------------------------------------------------|
   | Up      | No known failure; eligible for normal selection.                 
                |
   | Down    | Blocked; no connections permitted until `_last_failure + 
fail_window` elapses. |
   | Suspect | Fail window has elapsed; connections are permitted. On success 
transitions to Up; on failure returns to Down. |
   
   # Changes
   
   HostDBInfo class
   - Converts struct to class with private _last_failure / _fail_count fields
   - Adds State enum (UP, DOWN, SUSPECT) and a canonical state(now, 
fail_window) method
   - Sugar helpers is_up(), is_down(now, fail_window), is_suspect(now, 
fail_window) for call-site clarity
   - mark_down(now, fail_window) now handles both UP→DOWN and SUSPECT→DOWN 
transitions; the latter refreshes the fail window by updating _last_failure
   - increment_fail_count takes fail_window so it can delegate to the updated 
mark_down
   - Moves all method implementations out of the header and into HostDBInfo.cc
   
   # Documentation
   - Replaces "zombie" with "suspect" throughout hostdb.en.rst
   
   # Tests
   - New test_HostDBInfo.cc with unit tests covering all state transitions 
including concurrent CAS races and full UP→DOWN→SUSPECT→DOWN→SUSPECT→UP cycles


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