You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@trafficserver.apache.org by GitBox <gi...@apache.org> on 2021/03/26 18:29:19 UTC

[GitHub] [trafficserver] bneradt opened a new pull request #7629: Add proxy.config.cache.log.alternate.eviction

bneradt opened a new pull request #7629:
URL: https://github.com/apache/trafficserver/pull/7629


   This commit adds the ability to toggle the logging of cache eviction of
   alternates. This can be helpful for tuning
   proxy.config.cache.limits.http.max_alts and detecting problematic
   Vary: behavior with origins.


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [trafficserver] masaori335 commented on a change in pull request #7629: Add proxy.config.cache.log.alternate.eviction

Posted by GitBox <gi...@apache.org>.
masaori335 commented on a change in pull request #7629:
URL: https://github.com/apache/trafficserver/pull/7629#discussion_r647030736



##########
File path: iocore/cache/CacheWrite.cc
##########
@@ -98,6 +98,30 @@ CacheVC::updateVector(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED */)
       if (od->move_resident_alt && get_alternate_index(write_vector, od->single_doc_key) == 0) {
         od->move_resident_alt = false;
       }
+      if (cache_config_log_alternate_eviction) {
+        CacheHTTPInfo *info = write_vector->get(0);
+        HTTPHdr *request    = info->request_get();
+        if (request->valid()) {
+          // In contrast to url_string_get, this url_print interface doesn't
+          // use HTTPHdr's m_heap which is not valid at this point because the
+          // HttpSM is most likely gone.
+          int url_length = request->url_printed_length();
+          ats_scoped_mem<char> url_text;
+          url_text   = static_cast<char *>(ats_malloc(url_length + 1));

Review comment:
       FWIW, `ts::LocalBuffer` is faster when url length is small by avoiding using heap.




-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [trafficserver] bneradt merged pull request #7629: Add proxy.config.cache.log.alternate.eviction

Posted by GitBox <gi...@apache.org>.
bneradt merged pull request #7629:
URL: https://github.com/apache/trafficserver/pull/7629


   


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [trafficserver] bneradt commented on pull request #7629: Add proxy.config.cache.log.alternate.eviction

Posted by GitBox <gi...@apache.org>.
bneradt commented on pull request #7629:
URL: https://github.com/apache/trafficserver/pull/7629#issuecomment-808433482


   I've marked this for the 9.1.x and 9.2.x projects because the feature is simple and low risk (the relevant code path is not exercised if the default-disabled feature is disabled) and has already proved useful to our production engineers. It should also merge easily.


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [trafficserver] bneradt edited a comment on pull request #7629: Add proxy.config.cache.log.alternate.eviction

Posted by GitBox <gi...@apache.org>.
bneradt edited a comment on pull request #7629:
URL: https://github.com/apache/trafficserver/pull/7629#issuecomment-808433482


   I've marked this for 9.2.x project because the feature is simple and low risk (the relevant code path is not exercised if the default-disabled feature is disabled) and has already proved useful to our production engineers. It should also merge easily.


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org