1

Supposing I have one relatively large file synced by unison. And the file changes for some time more frequently than unison is able to sync it. Does it squash subsequent changes or tries to queue and send every single version? Is it possible to configure a minimum time span between subsequent syncs for a single file or globally i.e.: queue all changes for some time and trigger an action squashing all subsequent changes made during the span?

ardabro
  • 187
  • 1
  • 7

1 Answers1

2

To the best of my knowledge, Unison doesn't queue more than one version of a given file to be synced. Instead it runs something like this:

  1. Unison is run and it walks over all your local and remote files and builds a list of the ones that have changed.

  2. Then Unison runs over that list and syncs the each file one at a time.

So there is no queuing of multiple version of a single file going on. After Unison recognizes that the file has changed since last sync, it just syncs whichever version happens to on the disk when it's reading the file in step 2. If the file is changed ten times between when it's added to the list in step 1 and synced in step 2, Unison doesn't know and will only see that last version. It really has no need to consider the intermediate versions.

Now if the file does update that frequently, then there is a chance that it'll update while Unison is syncing it, which will return an error. Something like

Failed to fingerprint file "foo.bar": the file keeps on changing

or sometimes something like File changed during sync ..., and it will just skip that file.

Mike Pierce
  • 257
  • 1
  • 11