f89a1b8216
Reorganized the reposize database directory, and split up a column. checkStaleSizeChanges needs to run before needLiveUpdate, otherwise the process won't be holding a lock on its pid file, and another process could go in and expire the live update it records. It just so happens that they do get called in the correct order, since checking balanced preferred content calls getLiveRepoSizes before needLiveUpdate. The 1 minute delay between checks is arbitrary, but will avoid excess work. The downside of it is that, if a process is dropping a file and gets interrupted, for 1 minute another process can expect a repository will soon be smaller than it is. And so a process might send data to a repository when a file is not really going to be dropped from it. But note that can already happen if a drop takes some time in eg locking and then fails. So it seems possible that live updates should only be allowed to increase, rather than decrease the size of a repository. |
||
---|---|---|
.. | ||
Keys | ||
RepoSize | ||
Benchmark.hs | ||
ContentIdentifier.hs | ||
Export.hs | ||
Fsck.hs | ||
Handle.hs | ||
ImportFeed.hs | ||
Init.hs | ||
Keys.hs | ||
Queue.hs | ||
RawFilePath.hs | ||
RepoSize.hs | ||
Types.hs | ||
Utility.hs |