DO NOT REPLY [Bug 3719] New: Improved "--update" logic

samba-bugs at samba-bugs at
Mon Apr 24 17:11:03 GMT 2006

           Summary: Improved "--update" logic
           Product: rsync
           Version: 2.6.5
          Platform: Sparc
        OS/Version: Solaris
            Status: NEW
          Severity: major
          Priority: P3
         Component: core
        AssignedTo: wayned at
        ReportedBy: yair.lenga at
         QAContact: rsync-qa at

I'm using rsync to update a "semi-live" repository of files, where users may
update either the master or the backup repository. I'm using '--update' to make
sure that old files do not overwrite newer files.

In the current code, the timestamp is capture and compared at the beginning of
the transfer. At this point, a decision is made if the update will be
performed. This implementation create a window where a file on the recieving
side can be updated, and then overwritten by a file from the backup repository.

Suggested fix will be to add an extra check for the timestamp of the
destination file, before renaming the temporary file into the final name.

With this check, the window where newer files can be written will be reduced to
few milliseconds - much better then the current window - few seconds -
depending on file size, communication gap, etc. The cost for the extra 'stat'
is minor (compared with the overall cost of getting the update).

Configure bugmail:
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.

More information about the rsync mailing list