From: Alex Rousskov Date: Thu, 27 Oct 2011 20:39:23 +0000 (-0600) Subject: Bug 3383: store.cc:1631: "new_status != IN_MEMORY" assertion X-Git-Tag: BumpSslServerFirst.take01~69 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6ebe9a4c88246fe92235a43bfbbe1b8d5d452048;p=thirdparty%2Fsquid.git Bug 3383: store.cc:1631: "new_status != IN_MEMORY" assertion UsingSmp() is not the right condition to detect whether we are using a shared cache because shared memory caching may be disabled and because Coordinator does not use a shared memory cache even if shared caching is enabled. The assertion was triggered by icons being added to Coordinator local memory cache. TODO: Coordinator does not need to cache [icons] at all. --- diff --git a/src/store.cc b/src/store.cc index f99f864f8d..22df2c87bb 100644 --- a/src/store.cc +++ b/src/store.cc @@ -1627,7 +1627,8 @@ StoreEntry::setMemStatus(mem_status_t new_status) if (new_status == mem_status) return; - if (UsingSmp()) { + // are we using a shared memory cache? + if (Config.memShared && IamWorkerProcess()) { assert(new_status != IN_MEMORY); // we do not call this otherwise // This method was designed to update replacement policy, not to // actually purge something from the memory cache (TODO: rename?).