Re: rsyncing files that might change
At 23:09 31.10.2007 -0400, Matt McCutchen wrote: On Thu, 2007-11-01 at 10:35 +1000, Franc Carter wrote: If am rsyncing a file and I have the the following sequence of events happen in the same second 1. rsync starts 2. rsync sends some chunk of data to the other end 3 a local process modifies the chunk that has just been sent So, my question - is this case a race condition in which a subsequent run of rsync may miss that the file has been modified and hence skip it ? Unfortunately, yes. Shouldn't that be caught by the fact that the source file has a new (or at least different) time stamp now? bye Fabi -- To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Re: rsyncing files that might change
On 11/1/07, Fabian Cenedese [EMAIL PROTECTED] wrote: At 23:09 31.10.2007 -0400, Matt McCutchen wrote: On Thu, 2007-11-01 at 10:35 +1000, Franc Carter wrote: If am rsyncing a file and I have the the following sequence of events happen in the same second 1. rsync starts 2. rsync sends some chunk of data to the other end 3 a local process modifies the chunk that has just been sent So, my question - is this case a race condition in which a subsequent run of rsync may miss that the file has been modified and hence skip it ? Unfortunately, yes. Shouldn't that be caught by the fact that the source file has a new (or at least different) time stamp now? Sorry, I should have given a clearer example. All in one second 1. a process modifies the file and hence updates the source timesatmp 2. rsync starts 3. rsync sends the first chunk of data 4. a process modified the chunk that has been sent, but because it is in the same second there is no visible change to the timestamp bye Fabi -- To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html -- Franc -- To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Re: rsyncing files that might change
On 11/1/07, Matt McCutchen [EMAIL PROTECTED] wrote: On Thu, 2007-11-01 at 10:35 +1000, Franc Carter wrote: If am rsyncing a file and I have the the following sequence of events happen in the same second 1. rsync starts 2. rsync sends some chunk of data to the other end 3 a local process modifies the chunk that has just been sent So, my question - is this case a race condition in which a subsequent run of rsync may miss that the file has been modified and hence skip it ? Unfortunately, yes. Ok, thanks. Matt -- Franc -- To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Re: rsyncing files that might change
Franc Carter wrote: Unfortunately, yes. Shouldn't that be caught by the fact that the source file has a new (or at least different) time stamp now? Sorry, I should have given a clearer example. All in one second 1. a process modifies the file and hence updates the source timesatmp 2. rsync starts 3. rsync sends the first chunk of data 4. a process modified the chunk that has been sent, but because it is in the same second there is no visible change to the timestamp bye Fabi If this is a real problem, you might try a filesystem and OS version which supports microsecond or nanosecond timestamps. There's still no guarantee that changes are detected, but it's more likely. Oh, and I'm not sure if rsync reads the sub-second timestamps yet :-) -- Jamie -- To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
RE: rsyncing files that might change
Flames/Cluestick invited if I've got this wrong. I would expect: rsync checks blocks on source to see if they are the same. blocks which seemed to be the same (past tense) are not sent. blocks which seemed to be different will be sent with whatever the current content of the block happens to be. there is no check at the end to see that nothing changed in the interim. There MIGHT be something about file changed during transfer --- but some things big long messy --- you do what you can with what you've got. Hi, I hope I have not been google-incompetant, but I have been unable to find an explicit answer a case I am concerned about. If am rsyncing a file and I have the the following sequence of events happen in the same second 1. rsync starts 2. rsync sends some chunk of data to the other end 3 a local process modifies the chunk that has just been sent I have seen statements that rsync does a whole file checksum once the transfer is complete - but I couldn't find an explicit statement of whether this checksum is computed after the transfer has completed. So, my question - is this case a race condition in which a subsequent run of rsync may miss that the file has been modified and hence skip it ? thanks -- Franc -- To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Re: rsyncing files that might change
On Thu, 2007-11-01 at 10:35 +1000, Franc Carter wrote: If am rsyncing a file and I have the the following sequence of events happen in the same second 1. rsync starts 2. rsync sends some chunk of data to the other end 3 a local process modifies the chunk that has just been sent So, my question - is this case a race condition in which a subsequent run of rsync may miss that the file has been modified and hence skip it ? Unfortunately, yes. Matt -- To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html