One more batching issue RRS feed

  • Question

  • Hi, I am using batching stored procedure suggested here http://msdn.microsoft.com/en-us/library/bb902828.aspx.

    I noticed soetimes the @sync_last_received_anchor set (sent to usp_GetNewBatchAnchor) during subsequent batches is incorrect.

    Assume there are 294 batch count with batch size 1000 , so anchor trace during synchronization is as follows:
    Sr.	Count	last	max	 new
    1	294	10314312	10607719	10315312
    2	294	10315312	10607719	10316312
    3	294	10316312	10607719	10317312
    4	294	10314312	10607719	10315312
    5	294	10315312	10607719	10316312

    My observation is last_re ceived_anchor passed during execution of 4th batch is incorrect; ideally it should pass the value of new_received_anchor in previous pass. During execution of 4th batch, it has picked last received anchor set during execution of first batch.

    This could happen because of some internal error or incorrect swapping inside the framework. Note that this issue is not always reproducable.

    Please let me know, if anyone has faced such issue?

    Additional info : I am using bidirectional sync with Sql Express and Sql Ent with WCF service in between.
    • Edited by mandy.work Wednesday, August 26, 2009 11:24 AM
    • Moved by Max Wang_1983 Thursday, April 21, 2011 11:38 PM forum consolidation (From:SyncFx - Microsoft Sync Framework Database Providers [ReadOnly])
    Wednesday, August 26, 2009 9:58 AM

All replies

  • Mandy,

    Have you considered moving to the SQL provider we have built instead?  The batching features are far superior and include the following advantages:

    ·      Memory based vs date range/record count based batching to avoid OOM errors for most cases

    ·      Improved predictability re: resource usage

    ·      Significant reduction in complexity

    ·      Reduced chattiness

    For some good links see the following thread:


    Also, you would be leveraging a first class provider (SqlSyncProvider) that ships with the framework and also reduces the complexity of you app significantly


    Sean Kelley
    Program Manager





    Wednesday, September 2, 2009 6:25 PM