From: Alex Rousskov Date: Fri, 11 Mar 2016 17:24:13 +0000 (-0700) Subject: Removed SWAPOUT_WRITING assertion from storeSwapMetaBuild(). X-Git-Tag: SQUID_4_0_8~44 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=92c08a49dfe5c4b2fe81072c2266eaaf1a79de26;p=thirdparty%2Fsquid.git Removed SWAPOUT_WRITING assertion from storeSwapMetaBuild(). I do not see any strong dependency of that code on that state and we need to be able to build swap metadata when updating a stale entry (which would not normally be in the SWAPOUT_WRITING state). The biggest danger is that somebody calls storeSwapMetaBuild() when the entry metadata is not yet stable. I am not sure we have a way of detecting that without using something as overly strong as SWAPOUT_WRITING. --- diff --git a/src/store_swapmeta.cc b/src/store_swapmeta.cc index 125a315718..9ffb4ace95 100644 --- a/src/store_swapmeta.cc +++ b/src/store_swapmeta.cc @@ -42,7 +42,6 @@ storeSwapMetaBuild(StoreEntry * e) const char *vary; assert(e->mem_obj != NULL); const int64_t objsize = e->mem_obj->expectedReplySize(); - assert(e->swap_status == SWAPOUT_WRITING); // e->mem_obj->request may be nil in this context SBuf url;