]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Removed SWAPOUT_WRITING assertion from storeSwapMetaBuild().
authorAlex Rousskov <rousskov@measurement-factory.com>
Fri, 11 Mar 2016 17:24:13 +0000 (10:24 -0700)
committerAlex Rousskov <rousskov@measurement-factory.com>
Fri, 11 Mar 2016 17:24:13 +0000 (10:24 -0700)
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.

src/store_swapmeta.cc

index 125a3157181f9dee4787404f316f9fa6e18ec03e..9ffb4ace9522171e3ebb60d7108f6c347934f172 100644 (file)
@@ -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;