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

bnolsen pushed a commit to branch strat_rec
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit 0bcd5d8ef0b71669f77b9df9fdc5879f3d2bfb63
Author: Brian Olsen <[email protected]>
AuthorDate: Wed May 31 15:57:20 2023 +0000

    internal strategies set rec to extApiParent to make ParentResult::is_some 
work
---
 proxy/http/remap/NextHopConsistentHash.cc   | 1 +
 proxy/http/remap/NextHopRoundRobin.cc       | 1 +
 proxy/http/remap/NextHopSelectionStrategy.h | 1 -
 3 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/proxy/http/remap/NextHopConsistentHash.cc 
b/proxy/http/remap/NextHopConsistentHash.cc
index fe23dbe854..f463960a1c 100644
--- a/proxy/http/remap/NextHopConsistentHash.cc
+++ b/proxy/http/remap/NextHopConsistentHash.cc
@@ -462,6 +462,7 @@ NextHopConsistentHash::findNextHop(TSHttpTxn txnp, void 
*ih, time_t now)
     result.hostname    = pRec->hostname.c_str();
     result.last_parent = pRec->host_index;
     result.last_lookup = result.last_group = cur_ring;
+    result.rec                             = extApiRecord;
     switch (scheme) {
     case NH_SCHEME_NONE:
     case NH_SCHEME_HTTP:
diff --git a/proxy/http/remap/NextHopRoundRobin.cc 
b/proxy/http/remap/NextHopRoundRobin.cc
index f2e872553e..758a0ace6c 100644
--- a/proxy/http/remap/NextHopRoundRobin.cc
+++ b/proxy/http/remap/NextHopRoundRobin.cc
@@ -171,6 +171,7 @@ NextHopRoundRobin::findNextHop(TSHttpTxn txnp, void *ih, 
time_t now)
       result->last_parent = cur_hst_index;
       result->last_group  = cur_grp_index;
       result->retry       = parentRetry;
+      result->rec         = extApiRecord;
       ink_assert(result->hostname != nullptr);
       ink_assert(result->port != 0);
       NH_Debug(NH_DEBUG_TAG, "[%" PRIu64 "] Chosen parent = %s.%d", sm_id, 
result->hostname, result->port);
diff --git a/proxy/http/remap/NextHopSelectionStrategy.h 
b/proxy/http/remap/NextHopSelectionStrategy.h
index 1fe49cb701..4047c96049 100644
--- a/proxy/http/remap/NextHopSelectionStrategy.h
+++ b/proxy/http/remap/NextHopSelectionStrategy.h
@@ -27,7 +27,6 @@
 #include <utility>
 
 #include "ts/parentselectdefs.h"
-#include "ParentSelection.h"
 #include "HttpTransact.h"
 
 #ifndef _NH_UNIT_TESTS_

Reply via email to