From 4a75561aa5e9d5e85ee55be8a329a7ff807bba94 Mon Sep 17 00:00:00 2001 From: bneradt Date: Mon, 29 Mar 2021 20:58:41 +0000 Subject: [PATCH] Comment why log eviction isn't implemented via a log field. --- iocore/cache/CacheWrite.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/iocore/cache/CacheWrite.cc b/iocore/cache/CacheWrite.cc index 95e069f5fda..13684c4e183 100644 --- a/iocore/cache/CacheWrite.cc +++ b/iocore/cache/CacheWrite.cc @@ -99,6 +99,13 @@ CacheVC::updateVector(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED */) od->move_resident_alt = false; } if (cache_config_log_alternate_eviction) { + // Initially there was an attempt to make alternate eviction a log + // field. However it was discovered this could not work because this + // code, in which alternates are evicted, happens during the processing + // of IO which happens after transaction logs are emitted and after the + // HttpSM is destructed. Instead, therefore, alternate eviction logging + // was implemented for diags.log with the + // proxy.config.cache.log.alternate.eviction toggle. CacheHTTPInfo *info = write_vector->get(0); HTTPHdr *request = info->request_get(); if (request->valid()) {