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

cmcfarlen pushed a commit to branch 10.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/10.0.x by this push:
     new 1e86b6021d Fix incorrect metric for agg_copy bytes written (#11508) 
(#11532)
1e86b6021d is described below

commit 1e86b6021d5810bdb47d0872bf9c2f338035ae80
Author: JosiahWI <[email protected]>
AuthorDate: Wed Jul 10 11:30:25 2024 -0500

    Fix incorrect metric for agg_copy bytes written (#11508) (#11532)
    
    We introduced an issue in f23826d where we count backlog failures when
    copying bytes to the aggregation buffer. The original, intended behavior,
    was to count the number of bytes copied. This restores the original 
behavior.
    
    Fixes #11457.
---
 src/iocore/cache/CacheWrite.cc | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/iocore/cache/CacheWrite.cc b/src/iocore/cache/CacheWrite.cc
index e1db30375b..fd4f87efab 100644
--- a/src/iocore/cache/CacheWrite.cc
+++ b/src/iocore/cache/CacheWrite.cc
@@ -731,10 +731,9 @@ agg_copy(char *p, CacheVC *vc)
         ProxyMutex *mutex ATS_UNUSED = vc->stripe->mutex.get();
         ink_assert(mutex->thread_holding == this_ethread());
 
-// ToDo: Why are these for debug only ?
 #ifdef DEBUG
-        Metrics::Counter::increment(cache_rsb.write_backlog_failure);
-        
Metrics::Counter::increment(stripe->cache_vol->vol_rsb.write_backlog_failure);
+        Metrics::Counter::increment(cache_rsb.write_bytes, vc->write_len);
+        Metrics::Counter::increment(stripe->cache_vol->vol_rsb.write_bytes, 
vc->write_len);
 #endif
       }
       if (vc->f.rewrite_resident_alt) {

Reply via email to