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

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


https://bugzilla.samba.org/show_bug.cgi?id=3719

           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 samba.org
        ReportedBy: yair.lenga at citigroup.com
         QAContact: rsync-qa at samba.org


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: https://bugzilla.samba.org/userprefs.cgi?tab=email
------- 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