Skip to content

backout down parent retry limiting in parent selection and nexthop strategies - #8546

Merged
jrushford merged 1 commit into
apache:masterfrom
jrushford:remove_max_retriers
Dec 8, 2021
Merged

backout down parent retry limiting in parent selection and nexthop strategies#8546
jrushford merged 1 commit into
apache:masterfrom
jrushford:remove_max_retriers

Conversation

@jrushford

Copy link
Copy Markdown
Contributor

backs out the parent retry limiting in parent selection and next hop strategies due to issues found with this in production use.

@jrushford jrushford self-assigned this Dec 7, 2021
@jrushford jrushford added this to the 10-Dev milestone Dec 7, 2021
@bneradt

bneradt commented Dec 7, 2021

Copy link
Copy Markdown
Contributor

@ywkaras volunteered to take a look at this.

@jrushford
jrushford merged commit 3e8f2eb into apache:master Dec 8, 2021
@zwoop zwoop modified the milestones: 10-Dev, 10.0.0 Dec 9, 2021
zwoop pushed a commit that referenced this pull request Dec 9, 2021
@zwoop zwoop removed the 9.2.0 label Dec 9, 2021
@zwoop zwoop modified the milestones: 10.0.0, 9.1.2 Dec 9, 2021
moonchen pushed a commit to moonchen/trafficserver that referenced this pull request Mar 17, 2022
* asf/9.2.x:
  Updated ChangeLog
  docs: fix fedora install notes and spelling issues (apache#8537)
  Docs: Fix default value of proxy.config.ssl.handshake_timeout_in (apache#8574)
  Partial of revert "Cleanup generated LDFLAGS for jemalloc (apache#8285)" (apache#8533)
  TSUserArg: add value type checking (apache#8550)
  Relax key validation of sni.yaml (apache#8549)
  Clear random header value by AIO read error (apache#8559)
  Fixes macOS arm64 builds (again) (apache#8556)
  Traffic Dump: Use the correct transaction user index (apache#8548)
  combo_handler: Initialize User Arg Index in TSRemapInit (apache#8551)
  backout down parent retry limiting in parent selection and nexthop (apache#8546)
masaori335 added a commit that referenced this pull request Aug 5, 2026
A parent that accepts connections but never sends a response was
marked down and then restored to the pool by the very next retry
probe, even when that probe also failed, so it kept receiving traffic
indefinitely while healthy peers took none of the load.

handle_response_from_parent() called markParentUp() on entry, before
the switch on current.state, so a parent selected as a retry candidate
was restored before ATS knew the retry's outcome. markParentUp() zeroes
failedAt and failCount; the markParentDown() that follows a failed
probe then takes its result->retry branch, which leaves new_fail_count
at 0, so available is never re-cleared. The parent therefore returned
to the pool with a cleared failure count after every retry_time window,
no matter how long it stayed degraded.

The CONNECTION_ALIVE branch already calls markParentUp() for a retry
that actually succeeded, which is the correct restore point. Removing
the entry call restores the behavior that predates #8546: that commit
backed out the retry-limiting work and replaced a retryComplete() call
-- which only decremented an in-flight retry counter and never touched
availability -- with markParentUp(), silently turning "the retry
finished" into "the parent is healthy".

Two autests pin both outcomes of the retry path. A parent that is still
silent when probed stays down; a parent that has recovered is restored.
Each was negative-controlled against its own call site: reverting this
change fails the first, and removing the CONNECTION_ALIVE call fails
only the second.
cmcfarlen pushed a commit that referenced this pull request Aug 6, 2026
A parent that accepts connections but never sends a response was
marked down and then restored to the pool by the very next retry
probe, even when that probe also failed, so it kept receiving traffic
indefinitely while healthy peers took none of the load.

handle_response_from_parent() called markParentUp() on entry, before
the switch on current.state, so a parent selected as a retry candidate
was restored before ATS knew the retry's outcome. markParentUp() zeroes
failedAt and failCount; the markParentDown() that follows a failed
probe then takes its result->retry branch, which leaves new_fail_count
at 0, so available is never re-cleared. The parent therefore returned
to the pool with a cleared failure count after every retry_time window,
no matter how long it stayed degraded.

The CONNECTION_ALIVE branch already calls markParentUp() for a retry
that actually succeeded, which is the correct restore point. Removing
the entry call restores the behavior that predates #8546: that commit
backed out the retry-limiting work and replaced a retryComplete() call
-- which only decremented an in-flight retry counter and never touched
availability -- with markParentUp(), silently turning "the retry
finished" into "the parent is healthy".

Two autests pin both outcomes of the retry path. A parent that is still
silent when probed stays down; a parent that has recovered is restored.
Each was negative-controlled against its own call site: reverting this
change fails the first, and removing the CONNECTION_ALIVE call fails
only the second.

(cherry picked from commit 698cb9f)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants