This is an automated email from the ASF dual-hosted git repository.
zwoop pushed a commit to branch 9.2.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/9.2.x by this push:
new bbeec4db2 add a metric to track how often the range seek bug is
detected (#8970)
bbeec4db2 is described below
commit bbeec4db21c205b7306949f6a4814f79b92f9ec4
Author: Chris McFarlen <[email protected]>
AuthorDate: Tue Jul 26 13:02:42 2022 -0500
add a metric to track how often the range seek bug is detected (#8970)
Co-authored-by: Chris McFarlen <[email protected]>
(cherry picked from commit b23e8a0d1b042cc66833b47a2c2de2d74d171151)
---
iocore/cache/Cache.cc | 1 +
iocore/cache/CacheRead.cc | 2 ++
iocore/cache/P_CacheInternal.h | 1 +
3 files changed, 4 insertions(+)
diff --git a/iocore/cache/Cache.cc b/iocore/cache/Cache.cc
index 195143320..22b502aac 100644
--- a/iocore/cache/Cache.cc
+++ b/iocore/cache/Cache.cc
@@ -3088,6 +3088,7 @@ register_cache_stats(RecRawStatBlock *rsb, const char
*prefix)
REG_INT("read.active", cache_read_active_stat);
REG_INT("read.success", cache_read_success_stat);
REG_INT("read.failure", cache_read_failure_stat);
+ REG_INT("read.seek.failure", cache_read_seek_fail_stat);
REG_INT("write.active", cache_write_active_stat);
REG_INT("write.success", cache_write_success_stat);
REG_INT("write.failure", cache_write_failure_stat);
diff --git a/iocore/cache/CacheRead.cc b/iocore/cache/CacheRead.cc
index 7cf8064e9..4c33cdf5d 100644
--- a/iocore/cache/CacheRead.cc
+++ b/iocore/cache/CacheRead.cc
@@ -749,6 +749,8 @@ CacheVC::openReadMain(int /* event ATS_UNUSED */, Event *
/* e ATS_UNUSED */)
doc->magic = DOC_CORRUPT;
+ CACHE_INCREMENT_DYN_STAT(cache_read_seek_fail_stat);
+
CACHE_TRY_LOCK(lock, vol->mutex, mutex->thread_holding);
if (!lock.is_locked()) {
SET_HANDLER(&CacheVC::openReadDirDelete);
diff --git a/iocore/cache/P_CacheInternal.h b/iocore/cache/P_CacheInternal.h
index 8630d3a06..cf747de60 100644
--- a/iocore/cache/P_CacheInternal.h
+++ b/iocore/cache/P_CacheInternal.h
@@ -113,6 +113,7 @@ enum {
cache_read_active_stat,
cache_read_success_stat,
cache_read_failure_stat,
+ cache_read_seek_fail_stat,
cache_write_active_stat,
cache_write_success_stat,
cache_write_failure_stat,