This is an automated email from the ASF dual-hosted git repository.

cmcfarlen pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit 2d4c902a170b5c56cd709c01cbc01818c37e99d4
Author: Serris Lew <[email protected]>
AuthorDate: Tue Jul 1 09:00:04 2025 -0700

    Increment parent mark down if config allows (#12318)
    
    Co-authored-by: Serris Lew <[email protected]>
    (cherry picked from commit e0909abeeb04654e04ed9493f5c0a717d29c3bfa)
---
 src/proxy/http/HttpTransact.cc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/proxy/http/HttpTransact.cc b/src/proxy/http/HttpTransact.cc
index 4c146a6f97..0fd0fd2c06 100644
--- a/src/proxy/http/HttpTransact.cc
+++ b/src/proxy/http/HttpTransact.cc
@@ -235,7 +235,6 @@ findParent(HttpTransact::State *s)
 inline static void
 markParentDown(HttpTransact::State *s)
 {
-  Metrics::Counter::increment(http_rsb.total_parent_marked_down_count);
   url_mapping *mp = s->url_map.getMapping();
 
   TxnDbg(dbg_ctl_http_trans, "enable_parent_timeout_markdowns: %d, 
disable_parent_markdowns: %d",
@@ -249,6 +248,8 @@ markParentDown(HttpTransact::State *s)
   if (s->current.state == HttpTransact::INACTIVE_TIMEOUT && 
s->txn_conf->enable_parent_timeout_markdowns == 0) {
     return;
   }
+  // Increment metric when config allows ATS to mark parent down
+  Metrics::Counter::increment(http_rsb.total_parent_marked_down_count);
 
   if (s->response_action.handled) {
     // Do nothing. If a plugin handled the response, let it handle markdown.

Reply via email to