bcpierce00 / unison

Unison file synchronizer
GNU General Public License v3.0
4.11k stars 232 forks source link

Query on unison-fsmonitor behavior and documentation #860

Closed saisubodhMSFT closed 1 year ago

saisubodhMSFT commented 1 year ago

When ‘-repeat watch’ flag is enabled, a unison-fsmonitor process (for monitoring file changes) is spawned along with the main unison process. Since unison does an iterative comparison between files in the two input directories, if unison-fsmonitor comes up after the iterative comparison has started then it might miss some file changes of those that the unison process has already compared.

For example if the following series of events occur: unison has checked for the file changes in f1 during the iterative file comparison, then f1 is written to and then unison-fsmonitor comes up. In such a scenario, unison-fsmonitor wouldn’t be able to detect this write made to f1. This scenario seems possible if unison-fsmonitor starts after the unison process.

Can anyone confirm if this scenario would occur?

There doesn’t seem to be enough documentation on unison-fsmonitor implementation.

gdt commented 1 year ago

https://github.com/bcpierce00/unison/wiki/Reporting-Bugs-and-Feature-Requests

This belongs on unison-hackers.