I think this sounds good. I tried a little experiment on a Linux machine
using simply renaming of a directory while another process was in that
directory. The second process was not disturbed. I think, therefore, one

Welcome to the wonderful world of inodes.

could do the following at the rsync target machine where the rsync target
directory is named, say, xxxxx:

1. Create a new directory named, say, newxxxxx as a sibling to xxxxx.
2. Fill newxxxxx with the new material for rsync.
3. Rename xxxxx to oldxxxxx.
4. Rename newxxxxx to xxxxx.

Anyone connected to xxxxx before step 3 will remain connected to oldxxxxx
and get old data. Anyone starting rsync between steps 3 and 4 will get
nothing -- or some signal that xxxxx is unavailable. Anyone starting after
step 4 will get the new data. (I'm not sure that newxxxxx has to be a
sibling of xxxxx, but I haven't tried anything different.)

And anyone entering between 1 and 3 will have a problem. You can create newxxx outside of this space and then swap in quickly, but even that's not atomic, and not always possible.

The thing is, it's very difficult to implement anything on the server side that is guaranteed to be atomic from the RP's point of view. There's simply too much interaction between various abstraction levels (fs caches, filesystems, inodes, directory scans, symlinks, rsync, ...)

It's far easier to check consistency on the receiving side.

Robert
_______________________________________________
sidr mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/sidr

Reply via email to