none
Post Restore Fixup API, who assigns sync_check_concurrency value?

    General discussion

  • We all know Post Restore fixup updates the synchronization metadata (data in tracking tables) and in the end it updates the scope_info table with new sync knowledge. Below is the update  statement I got from sql trace:

    declare @p9 int
    set @p9=1
    exec sp_executesql N'UPDATE [scope_info] SET [scope_id] = @sync_scope_id, [scope_sync_knowledge] = @sync_scope_knowledge, [scope_tombstone_cleanup_knowledge] = @sync_scope_cleanup_knowledge, [scope_restore_count] = [scope_restore_count] + 1 WHERE [sync_scope_name] = @sync_scope_name AND (@sync_check_concurrency = 0 OR [scope_timestamp] = @sync_scope_timestamp);SET @sync_row_count = @@ROWCOUNT',N'@sync_scope_name nvarchar(100),@sync_scope_id uniqueidentifier,@sync_scope_knowledge varbinary(200),@sync_scope_cleanup_knowledge varbinary(140),@sync_check_concurrency int,@sync_scope_timestamp bigint,@sync_row_count int output',@sync_scope_name=N'SyncScope1',@sync_scope_id='A79890C3-0517-4C1D-A73C-EDC83BD39BA4',@sync_scope_knowledge=0x000000050000000000000004000000000000000500001000000004A79890C305174C1DA73CEDC83BD39BA4EA00C0329E1A49928C952F8AB3609A1281F77A4545E046FB9AE236F75EF0E7B122E12CC7D2154653B8A08706DCFE6274000000180000100128020000010000001500000002000000010000000000000001000000030000000100000000023E66E4000000020000000002A8AD72000000030000000003C4F895000000170000000100000016000000010003000000000100000000000000190100000000,@sync_scope_cleanup_knowledge=0x000000050000000000000004000000000000000500001000000003A79890C305174C1DA73CEDC83BD39BA4EA00C0329E1A49928C952F8AB3609A1281F77A4545E046FB9AE236F75EF0E7B10000001800001001280200000100000015000000010000000100000000000000170000000100000016000000010003000000000000000000000000190100000000,@sync_check_concurrency=1,@sync_scope_timestamp=37617120,@sync_row_count=@p9 output
    select @p9

    In above trace it has to satisfy below where condition for an update to be happen on scope_info:

    [sync_scope_name] = @sync_scope_name AND (@sync_check_concurrency = 0 OR [scope_timestamp] = @sync_scope_timestamp)

    In my case, [scope_timestamp] is not equal to @sync_scope_timestamp and sync_check_concurrency is passed as '1' by framework (post restore fixup API).How the value is assigned to sync_check_concurrency? What are you thoughts about the value coming as '1'.

    Thanks,

    Sai

    Monday, January 13, 2014 4:38 PM