ywkaras commented on code in PR #10940:
URL: https://github.com/apache/trafficserver/pull/10940#discussion_r1430443091
##########
src/proxy/http/HttpSM.cc:
##########
@@ -5721,18 +5721,14 @@ HttpSM::mark_host_failure(ResolveInfo *info, ts_time
time_down)
if (++info->active->fail_count >=
t_state.txn_conf->connect_attempts_rr_retries) {
if (info->active) {
if (info->active->last_failure.load() == TS_TIME_ZERO) {
- char *url_str =
t_state.hdr_info.client_request.url_string_get(&t_state.arena, nullptr);
+ char *url_str =
t_state.hdr_info.client_request.url_string_get_ref(nullptr);
Review Comment:
Will this reserve space for a copy of the URL every time it is called? Can
we be sure it will only be called once?
Should there be a swoc::AbstractMemArena, that MemArena inherits from, and
url_string_get() takes a reference to? Then there could be a
swoc::LocalMemArena that inherits from swoc::AbstractMemArena, that would have
an internal array, small enough so that LocalMemArena could reasonably be a
stack variable? That seems like it might be the ticket for this use case.
--
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]