bneradt commented on code in PR #12147:
URL: https://github.com/apache/trafficserver/pull/12147#discussion_r2049246770


##########
src/iocore/cache/CacheVC.h:
##########
@@ -281,8 +281,7 @@ struct CacheVC : public CacheVConnection {
   int                       fragment;
   int                       scan_msec_delay;
   CacheVC                  *write_vc;
-  char                     *hostname;
-  int                       host_len;
+  std::string_view          hostname;

Review Comment:
   Yes, you are correct about the `pin_in_cache` issue. Coverity reports type 
issues on that `pin_in_cache`. Two different commits went in to change its type 
to address the coverity warning (not just your commit, @masaori335 ). When that 
got changed to a 64 bit type rather than a 32 bit one, it resulted in cache 
incompatibility. Upgrading through that change would result in many warnings 
about cache inconsistency.
   
   @masaori335 is correct to be leary of this change. Maybe it would be fine? 
What are the underlying types of a string_view - if they are `char*` and `int` 
anyway, maybe it won't cause issues? But we would want to upgrade a box with 
cached items to test this and verify there are not cache inconsistency warnings.



-- 
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: github-unsubscr...@trafficserver.apache.org

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

Reply via email to