Help : Need to understand how anchors are set on client? RRS feed

  • Question

  • Hi,

    My application is hub-n-spoke or server client application with WCF service inbetween.

    I modified the sp_new_batch_anchor sp to trace the sync_last_received_anchor and sync_new_received_anchor by inserting them in tracing table. Similarly I am tracing the sync_new_received_anchor at client end in another trace table.

    Can anybody tell me more about how and when exactly anchors are set at client side?
    • Moved by Max Wang_1983 Thursday, April 21, 2011 11:56 PM forum consolidation (From:SyncFx - Microsoft Sync Framework Database Providers [ReadOnly])
    Thursday, August 20, 2009 2:57 PM


All replies

  • Hi,

    On the client side the new anchor is set in the same transaction that applies the changes in that batch. When batching each batch apply will set the last_received_anchor on the client side. If sync fails after some batches are downloaded but before sync completes then the next sync will pickup from where the first sync left off.

    The bottom line is that the client side is not aware of the fact that the changes are coming in batches. It treats each batch independently and commits anchor at the end of processing each batch.

    Hope this helps.

    Development Lead , Microsoft
    Thursday, August 20, 2009 10:14 PM
  • Sudarshan,

    I traced both the anchors (converting to bigint and inserting to table) at client and server side, and noticed that the value of @sync_last_received_anchor at both the ends is DIFFERENT.

    Is there something wrong in setup. My understanding is @sync_last_received_anchor at both the end should be same.

    Please correct.
    Friday, August 21, 2009 3:53 AM
  • The anchors are expected to be different on both sides. The last_received_anchor is the value of the last change that the node received from the other replica. Another post I just made may help shed some more light on this.



    Development Lead , Microsoft
    • Marked as answer by DevUser1 Saturday, August 22, 2009 5:35 PM
    Friday, August 21, 2009 6:43 PM