Fault tolerance of Sync Framework RRS feed

  • Question

  • Hello,

    We are about to start using Sync Framework in one of our projects. By the requirements of this project, synchronization will be performed on a background thread, and will be using WCF against another instance.

    Now, this opens quite a number of scenarios where things can go wrong, and I am really interested in knowing what I can expect from them:

    1. The application suddenly crashes. When this happens, the background thread - running Sync - will crash too - at any point of the sync process. When this happens, what can I expect next time I try the sync process? Will it gracefully recover from the failure? Will it raise some exception? Assuming that any external data access is safe, will the metadata file be corrupted?

    I'm also interested in the case where I have to abort the sync  - for example, if the user wants to close the application, and a huge synchronization is running. If there is no way to cancel it "the right way" (haven't found it yet), then I will have to Thread.Abort() it... with which consequences?

    2. The network connection breaks. Will both instances be notified of the break? Will they both cancel the sync operation gracefully? Will they hang?

    Maybe I'm being a bit too paranoid, but I would really like to know what to expect before trusting the precious data from my users to Sync.

    Thanks in advance,

    Fernando Nájera

    Tuesday, April 13, 2010 9:28 AM

All replies

  • care to elaborate which type of scenario you have? are you using the offline providers or the collaboration?


    Tuesday, April 13, 2010 9:43 AM
  • What kind of store are you synchronizing? Fault Tolerance is based on that. In general, Sync will fail whenever it gets an error from underlying store or network connection. If the stores are relational providers then transactions guarantee from storing partial or corrupt data. If sync fails those transactions will be aborted.

    Sync currently doesnt have an abort operation. What is the scenario that requires you to abort sync?


    Maheshwar Jayaraman - http://blogs.msdn.com/mahjayar
    • Proposed as answer by Jandeep Thursday, April 29, 2010 7:04 PM
    Tuesday, April 13, 2010 6:42 PM