git-annex/Database
Joey Hess 4d2f95853d
closing in on finishing live reposizes
Fixed successfullyFinishedLiveSizeChange to not update the rolling total
when a redundant change is in RecentChanges.

Made setRepoSizes clear RecentChanges that are no longer needed.
It might be possible to clear those earlier, this is only a convenient
point to do it.

The reason it's safe to clear RecentChanges here is that, in order for a
live update to call successfullyFinishedLiveSizeChange, a change must be
made to a location log. If a RecentChange gets cleared, and just after
that a new live update is started, making the same change, the location
log has already been changed (since the RecentChange exists), and
so when the live update succeeds, it won't call
successfullyFinishedLiveSizeChange. The reason it doesn't
clear RecentChanges when there is a reduntant live update is because
I didn't want to think through whether or not all races are avoided in
that case.

The rolling total in SizeChanges is never cleared. Instead,
calcJournalledRepoSizes gets the initial value of it, and then
getLiveRepoSizes subtracts that initial value from the current value.
Since the rolling total can only be updated by updateRepoSize,
which is called with the journal locked, locking the journal in
calcJournalledRepoSizes ensures that the database does not change while
reading the journal.
2024-08-27 12:54:46 -04:00
..
Keys sqlite datbase for importfeed 2023-10-23 16:46:22 -04:00
RepoSize plumb in LiveUpdate (WIP) 2024-08-23 16:35:12 -04:00
Benchmark.hs filter out control characters in error messages 2023-04-10 13:50:51 -04:00
ContentIdentifier.hs update 2024-03-08 14:32:29 -04:00
Export.hs sqlite datbase for importfeed 2023-10-23 16:46:22 -04:00
Fsck.hs enable TypeOperators 2023-08-01 18:33:39 -04:00
Handle.hs run codespell throughout fixing typos automagically 2024-05-01 15:46:21 -04:00
ImportFeed.hs implement journalledRepoSizes 2024-08-14 13:53:24 -04:00
Init.hs use RawFilePath for opening sqlite databases 2023-12-26 18:31:52 -04:00
Keys.hs update RepoSize database from git-annex branch incrementally 2024-08-17 13:35:00 -04:00
Queue.hs added reposize database 2024-08-12 11:19:58 -04:00
RawFilePath.hs avoid build warnings 2023-12-26 19:39:01 -04:00
RepoSize.hs closing in on finishing live reposizes 2024-08-27 12:54:46 -04:00
Types.hs sqlite datbase for importfeed 2023-10-23 16:46:22 -04:00
Utility.hs Sped up sqlite inserts 2x when built with persistent 2.14.5.0 2023-03-31 14:38:25 -04:00