none
Infinite loop during Synchronization....

    Question

  • Hi Community, during the Synchronization, the sync framework enters into a dead loop 

    Retrying... Knowledge to write ReplicaKeyMap:

    as shown in the following log:

    VERBOSE, OpSystem.vshost, 9, 07/17/2014 04:02:02:453, Merging in cleanup knowledge
    VERBOSE, OpSystem.vshost, 9, 07/17/2014 04:02:02:454, New destination ReplicaKeyMap: [(0:5b83467b0d5911e4ac3ef8b1569a2516) (1:261b58810d5911e4b1d1b8763fd81c4e)] ScopeRangeSet: [00:[(0:20140717102335) (1:20140716132154)]]
    VERBOSE, OpSystem.vshost, 9, 07/17/2014 04:02:02:459, Writing scope using command: sync.sp_UpdateScopeInfo
    VERBOSE, OpSystem.vshost, 9, 07/17/2014 04:02:02:462,    Executing Command: sync.sp_UpdateScopeInfo
    VERBOSE, OpSystem.vshost, 9, 07/17/2014 04:02:02:463,       Parameter: @sync_scope_knowledge Len: 156 Value: 00-00-00-05-00-00-00-00-00-00-00-01-00-00-00-00-00...
    VERBOSE, OpSystem.vshost, 9, 07/17/2014 04:02:02:464,       Parameter: @sync_scope_cleanup_knowledge Len: 124 Value: 00-00-00-05-00-00-00-00-00-00-00-01-00-00-00-00-00...
    VERBOSE, OpSystem.vshost, 9, 07/17/2014 04:02:02:464,       Parameter: @sync_scope_name Len: 6 Value: entity
    VERBOSE, OpSystem.vshost, 9, 07/17/2014 04:02:02:465,       Parameter: @sync_check_concurrency Value: 1
    VERBOSE, OpSystem.vshost, 9, 07/17/2014 04:02:02:465,       Parameter: @sync_scope_id Value: 5b83467b-0d59-11e4-ac3e-f8b1569a2516
    VERBOSE, OpSystem.vshost, 9, 07/17/2014 04:02:02:466,       Parameter: @sync_scope_timestamp Value: 1405563816
    VERBOSE, OpSystem.vshost, 9, 07/17/2014 04:02:02:466,       Parameter: @sync_row_count Value: Skipped since Not Input/InputOutput
    VERBOSE, OpSystem.vshost, 9, 07/17/2014 04:02:02:606,    Rows affected: 0
    INFO   , OpSystem.vshost, 9, 07/17/2014 04:02:02:606, Unable to commit Scope Info
    INFO   , OpSystem.vshost, 9, 07/17/2014 04:02:02:616,    Retrying... Knowledge to write ReplicaKeyMap: [(0:5b83467b0d5911e4ac3ef8b1569a2516) (1:261b58810d5911e4b1d1b8763fd81c4e)] ScopeRangeSet: [00:[(0:20140717102335) (1:20140716132154)]]
    VERBOSE, OpSystem.vshost, 9, 07/17/2014 04:02:02:618,    Executing Command: SELECT scope_id, scope_local_id, scope_sync_knowledge, scope_tombstone_cleanup_knowledge, scope_timestamp FROM sync.ScopeInfo WHERE scope_name = @sync_scope_name
    VERBOSE, OpSystem.vshost, 9, 07/17/2014 04:02:02:620,       Parameter: @sync_scope_name Len: 6 Value: entity
    INFO   , OpSystem.vshost, 9, 07/17/2014 04:02:02:727,    Reread Local ReplicaKeyMap: [(0:5b83467b0d5911e4ac3ef8b1569a2516) (1:261b58810d5911e4b1d1b8763fd81c4e)] ScopeRangeSet: [00:[(0:20140717102335) (1:20140716132154)]]
    VERBOSE, OpSystem.vshost, 9, 07/17/2014 04:02:02:794, Writing scope using command: sync.sp_UpdateScopeInfo
    VERBOSE, OpSystem.vshost, 9, 07/17/2014 04:02:02:795,    Executing Command: sync.sp_UpdateScopeInfo
    VERBOSE, OpSystem.vshost, 9, 07/17/2014 04:02:02:796,       Parameter: @sync_scope_knowledge Len: 156 Value: 00-00-00-05-00-00-00-00-00-00-00-01-00-00-00-00-00...
    VERBOSE, OpSystem.vshost, 9, 07/17/2014 04:02:02:796,       Parameter: @sync_scope_cleanup_knowledge Len: 124 Value: 00-00-00-05-00-00-00-00-00-00-00-01-00-00-00-00-00...
    VERBOSE, OpSystem.vshost, 9, 07/17/2014 04:02:02:797,       Parameter: @sync_scope_name Len: 6 Value: entity
    VERBOSE, OpSystem.vshost, 9, 07/17/2014 04:02:02:797,       Parameter: @sync_check_concurrency Value: 1
    VERBOSE, OpSystem.vshost, 9, 07/17/2014 04:02:02:798,       Parameter: @sync_scope_id Value: 5b83467b-0d59-11e4-ac3e-f8b1569a2516
    VERBOSE, OpSystem.vshost, 9, 07/17/2014 04:02:02:798,       Parameter: @sync_scope_timestamp Value: 1405563816
    VERBOSE, OpSystem.vshost, 9, 07/17/2014 04:02:02:799,       Parameter: @sync_row_count Value: Skipped since Not Input/InputOutput
    VERBOSE, OpSystem.vshost, 9, 07/17/2014 04:02:02:802,    Rows affected: 0
    INFO   , OpSystem.vshost, 9, 07/17/2014 04:02:02:803,    Retrying... Knowledge to write ReplicaKeyMap: [(0:5b83467b0d5911e4ac3ef8b1569a2516) (1:261b58810d5911e4b1d1b8763fd81c4e)] ScopeRangeSet: [00:[(0:20140717102335) (1:20140716132154)]]

    ......................


    Anyone knows the reason? Why always "Unable to commit Scope Info"? What should I changed? Or what I missed in my customized sync provider?

    Thanks.

    Thursday, July 17, 2014 6:01 AM

All replies

  • Anyone gives some suggestion about this?


    • Edited by jun26 Monday, July 21, 2014 6:02 AM
    Monday, July 21, 2014 6:01 AM
  • why is your rows affected for the update showing zero?
    Tuesday, July 22, 2014 2:04 AM
    Moderator
  • Hi JuneT, 

    Yes, the rows affected should be 1 (1 new row in a replica), but it shows 0. 

    Zero means failed to update the scope_info? Why no exception or error is returned?  

    And how could I change to prevent the loop from happening, and return with the error information after a certain time or retry count(currently, it never stops, retrying a whole night.... which is unacceptable)?

    Thanks.

    Tuesday, July 22, 2014 2:32 AM
  • can you profile the SQL statement being sent to the database and run it yourself manually to see if there are any errors?
    Wednesday, July 23, 2014 1:30 AM
    Moderator
  • successfully run it manually with fake sync_scope_knowledge and sync_scope_cleanup_knowledge values...
    Wednesday, July 23, 2014 8:31 AM