You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by rr...@apache.org on 2022/07/26 18:02:49 UTC
[trafficserver] branch master updated: add a metric to track how often the range seek bug is detected (#8970)
This is an automated email from the ASF dual-hosted git repository.
rrm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/master by this push:
new b23e8a0d1 add a metric to track how often the range seek bug is detected (#8970)
b23e8a0d1 is described below
commit b23e8a0d1b042cc66833b47a2c2de2d74d171151
Author: Chris McFarlen <ch...@mcfarlen.us>
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 <cm...@apple.com>
---
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,