locked
Weird behavior of file sync always transferring files to receiving server even if there are no changes. RRS feed

  • Question

  • I work on a file sync based windows service which is uploading files from server 1 to server 2, with explicit detect changes as the only file sync option. Note that a long time ago, the previous developer worked with MS to override some implementation in the sync framework which would basically send the files from server 1 to 2 over HTTP protocol. When this would happen, the files would first reach server 2's temp folder, and then later get synced to the real target folder. This is because we have customers with firewalls between the servers being synced. Let us not try to question the environment here because we have ~1000 customers like this, nobody can change this setup.

    This is the behavior we see in different environments:

    a. If there are not many files to be synced (~200), once a sync is done, then next time if we run the same sync, no files are transferred. However, even if we add a single new file to this folder, run a sync, and this file moves over, if we run the sync once more, it will send all the files to server 2, even though none of it got changed.

    b. If there are a huge number of files to be synced (> 10,000), no matter whether a change is done on server 1 or not, everytime the sync happens, it will send all the files over using the HTTP protocol.

    I have a few questions regarding this:

    1. I am assuming that, only the knowledge metadata is used to determine whether a file needs to be synced or not. If so, why does the sync framework send all these files over to the remote server - even if none of them have changed? - I have not set the file sync options for hash code based file comparison, there is no need to send the file when it is already there on the other server. What is exactly happening? - what should I look at to figure out why this is happening?

    2. It looks like when these files are transferred over the wire, they don't get applied immediately. I see the actual work completed as 1000, with total work as 73,000. Looks like the actual applying of these files to the target folder will only happen AFTER all the files are copied over. Is there any way, I can force the sync to apply the changes sooner?

    Tuesday, March 6, 2012 5:05 PM

All replies

  • just a couple of clarification:

    are you synching it twice? e.g. server 1 to server 2 temp folder over http  and then server 2 temp folder to server 2 final folder?

    any other processes that might be changing the timestamps on the files? have you checked if the metadata files are being reset?

    Wednesday, March 7, 2012 1:53 AM