Subject: Bug#319177: some patchs

From: Joey Hess <[email-masked]>
Date: Wed, 20 Jul 2005 10:56:12 -0400

>      - call Cache::shutdown in File::shutdown to synchronize data between
>        cache and file.

I've applied the other patches, but it seems that this part of the patch
has a bug. Consider saving a file, when nothing in the cache is dirty.
With your patch, DbDriver::File::shutdown opens the file for write, then
calls the DDriver::Cache::shutdown. This loops over removed and dirty
items and calls the remove and save methods for them.

But at no point does it re-save clean items back to the file, so the
file ends up containing only items that were dirtied in the cache during
this run. The rest are deleted.

I'm also interested to know whether you found an actual problem that
your change above fixes.

-- 
see shy jo