You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by bn...@apache.org on 2023/09/27 16:39:22 UTC
[trafficserver] branch master updated: NextHopRoundRobin.cc: fix for cid 1518590 (#10534)
This is an automated email from the ASF dual-hosted git repository.
bnolsen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/master by this push:
new fd8797345b NextHopRoundRobin.cc: fix for cid 1518590 (#10534)
fd8797345b is described below
commit fd8797345b946711c4b0847794181e9391cfd086
Author: Brian Olsen <br...@comcast.com>
AuthorDate: Wed Sep 27 10:39:17 2023 -0600
NextHopRoundRobin.cc: fix for cid 1518590 (#10534)
* NextHopRoundRobin.cc: fix for cid 1518590
* use PRIdMAX for format specifier
---
proxy/http/remap/NextHopRoundRobin.cc | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/proxy/http/remap/NextHopRoundRobin.cc b/proxy/http/remap/NextHopRoundRobin.cc
index 508228e00b..87bcbd9566 100644
--- a/proxy/http/remap/NextHopRoundRobin.cc
+++ b/proxy/http/remap/NextHopRoundRobin.cc
@@ -132,24 +132,23 @@ NextHopRoundRobin::findNextHop(TSHttpTxn txnp, void *ih, time_t now)
}
NH_Debug(NH_DEBUG_TAG,
- "[%" PRIu64 "] Selected a parent, %s, failCount (faileAt: %d failCount: %d), FailThreshold: %" PRIu64
+ "[%" PRIu64 "] Selected a parent, %s, failCount (failedAt: %" PRIdMAX " failCount: %d), FailThreshold: %" PRIu64
", request_info->xact_start: %ld",
- sm_id, cur_host->hostname.c_str(), (unsigned)cur_host->failedAt, cur_host->failCount.load(), fail_threshold,
+ sm_id, cur_host->hostname.c_str(), (intmax_t)cur_host->failedAt, cur_host->failCount.load(), fail_threshold,
request_info.xact_start);
// check if 'cur_host' is available, mark it up if it is.
if ((cur_host->failedAt == 0) || (cur_host->failCount.load() < fail_threshold)) {
if (cur_host->available.load() && host_stat == TS_HOST_STATUS_UP) {
NH_Debug(NH_DEBUG_TAG,
- "[%" PRIu64
- "] Selecting a parent, %s, due to little failCount (faileAt: %d failCount: %d), FailThreshold: %" PRIu64,
- sm_id, cur_host->hostname.c_str(), (unsigned)cur_host->failedAt, cur_host->failCount.load(), fail_threshold);
+ "[%" PRIu64 "] Selecting a parent, %s, due to little failCount (failedAt: %" PRIdMAX
+ " failCount: %d), FailThreshold: %" PRIu64,
+ sm_id, cur_host->hostname.c_str(), (intmax_t)cur_host->failedAt, cur_host->failCount.load(), fail_threshold);
parentUp = true;
}
} else { // if not available, check to see if it can be retried. If so, set the retry flag and temporairly mark it as
// available.
_now == 0 ? _now = time(nullptr) : _now = now;
- if (((result->wrap_around) || (cur_host->failedAt + retry_time) < static_cast<unsigned>(_now)) &&
- host_stat == TS_HOST_STATUS_UP) {
+ if (((result->wrap_around) || (cur_host->failedAt + retry_time) < _now) && host_stat == TS_HOST_STATUS_UP) {
// Reuse the parent
parentUp = true;
parentRetry = true;