httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 44696] mod_cache sometimes serves old content despite having fetched new content
Date Wed, 13 Aug 2008 15:52:24 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=44696





--- Comment #7 from Ruediger Pluem <rpluem@apache.org>  2008-08-13 08:52:23 PST ---
(In reply to comment #6)
> Created an attachment (id=22441)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=22441) [details]
> iterate over buckets in a brigade to find eos

Thanks.

> 
> For the second race condition, Using remove_url the first time in
> cache_store_content should work, but I am concerned that remove_url is not
> light weight enough. (It deletes the headerfile, datafile and the directories
> if empty, while what I require is to just remove headers before the caching is
> started.)
> 
> What would you suggest? Is there a better way? or would it be better to add a
> 'remove_headers' method to the cache provider interface?
> 

I guess I was partly wrong with this race condition. It is not that large as I
anticipated first, because during opening the entity in open_entity where the
headers are read the fd for the datafile is also opened.
As we do a move later on to move the new body from the temporary file to
the new datafile location this should not harm. The open fd still references
to the old body datafile and the old body datafile should be gone after all fds
to it should be closed.
But of course there is still a possibility that the body file switches when the
old headers are read in open_entity and before opening the old datafile.
I currently have no good idea how to avoid this race.
Calling remove_url the first time in cache_store_content is IMHO a bad idea as
this can have severe performance implication if the delivery of the new content
takes a long time for whatever reason (slow client, slow backend). So this is
no way to go.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


Mime
View raw message