[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: flushing caches upon repository replacement - was: Copy and Reduce the size of SVn repos

From: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Mon, 9 Mar 2015 20:31:18 +0000

Andreas Stieger wrote on Sun, Mar 08, 2015 at 17:52:55 +0100:
> On 08/03/15 17:45, Branko Čibej wrote:
> > And it bears repeating: If you replace a repository, please make sure to
> > restart Apache and/or svnserve to clear stale caches.
>
> Is there something that can be done in the code to take care of that?
> Like watching the inode as {uuid,inode}-2-tuple and flush the caches if
> it changes?

It might be interesting to try and flush the caches if "youngest" had
gone back in time. That is, if we know that the repository at a given
(UUID, dirent) had once had r200, and right now its youngest is r100,
then flush all caches related to that (UUID, dirent) pair.

Perhaps there are other invariants we could also check in a similar
manner, for example, the md5 of the text-rep of the node-revision of the
root directory at the (cached value of youngest) revision: if the md5
changes, then the cache is stale..

Daniel
Received on 2015-03-09 21:34:01 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.