View Single Post
My understanding is that it is a bit more subtle than that. You need to have all the devices get in sync at t = 0, and then do that again at t >= 1 hour. After that, the transaction history over an hour old (which everyone agreed upon at t = 0) will be consolidated by the next device to do a sync. The 1 hour window is there to protect against a very slow sync that might be in progress. Syncing each twice within the same hour won't necessarily trim everything as is easily demonstrated. Anything less than an hour old will stay even if all the clients are up to date. Activity after t = 0 won't prevent the compaction, but the activity after t=0 won't be compacted until a subsequent compaction.

Basically, if all the devices are able to communicate for two successive hourly syncs, you'll only have zip files for any intervening transactions, plus one for the big collection of transactions that makes up the body of the database, plus any orphaned transactions which have somehow become unlinked. I find it works well at n = 4, so long as the 4th device (a second boot partition I use for testing) gets synced every day or two, otherwise the zip file count can grow pretty quickly.