locked
Range was provided out-of expected order RRS feed

  • Question

  • Hi there

     

    I'm working on a custom synchronization using 2 custom providers (Exchange and a custom application). 

    When launching the sync (by calling the Synchronize method), I'm immediately getting this exception:

    --------------------------------------------------------
    Microsoft.Synchronization.RangeOutOfOrderException: Range was provided out-of expected order. Ranges should be provided in increasing order.
     ---> System.Runtime.InteropServices.COMException (0x8004100A): Range was provided out-of expected order. Ranges should be provided in increasing order.

       à Microsoft.Synchronization.CoreInterop.ISyncSession.Start(CONFLICT_RESOLUTION_POLICY resolutionPolicy, _SYNC_SESSION_STATISTICS& pSyncSessionStatistics)
       à Microsoft.Synchronization.KnowledgeSyncOrchestrator.DoOneWaySyncHelper(SyncIdFormatGroup sourceIdFormats, SyncIdFormatGroup destinationIdFormats, KnowledgeSyncProviderConfiguration destinationCon
    figuration, SyncCallbacks DestinationCallbacks, ISyncProvider sourceProxy, ISyncProvider destinationProxy, Int32& changesApplied, Int32& changesFailed)
       --- Fin de la trace de la pile d'exception interne ---
       à Microsoft.Synchronization.KnowledgeSyncOrchestrator.DoOneWaySyncHelper(SyncIdFormatGroup sourceIdFormats, SyncIdFormatGroup destinationIdFormats, KnowledgeSyncProviderConfiguration destinationCon
    figuration, SyncCallbacks DestinationCallbacks, ISyncProvider sourceProxy, ISyncProvider destinationProxy, Int32& changesApplied, Int32& changesFailed)
       à Microsoft.Synchronization.KnowledgeSyncOrchestrator.DoOneWayKnowledgeSync(SyncProvider sourceProvider, SyncProvider destinationProvider, Int32& changesApplied, Int32& changesFailed)
       à Microsoft.Synchronization.KnowledgeSyncOrchestrator.Synchronize()
       à Microsoft.Synchronization.SyncOrchestrator.Synchronize()
    --------------------------------------------------------

    Any idea where it might come from ?

     

    Thanks for your help,

    Alexandre

    • Moved by Max Wang_1983 Thursday, April 21, 2011 10:02 PM forum consolidation (From:SyncFx - Technical Discussion [ReadOnly])
    Friday, June 27, 2008 1:49 PM

Answers

  • Hi Alexandre,

     

    If you can not use fixed ids as a workaround, there are two other workarounds you can use for CTP2:

    ·         Using batch size = 1 OR

    ·         Pad the ids so that they all have the same length.

     

    Tuesday, July 8, 2008 7:16 PM
  •  

    If you can not add the padding directly to the store, you could add it in the providers:

    - Pad the ids in GetChangeBatch and when retrieving the destination versions

    - Remove the padding when saving changes to the store.

    You just have to make sure that all the providers in the community pad and unpad the ids the same way.

    Wednesday, July 16, 2008 5:11 PM

All replies

  • To give you some more details:

    - I'm using SQLCeMetadataStore with VariableLength and a length 255 for ItemId formats

    - It was working perfectly until i started to used different lengths for the item IDs, so i guess it is related. Before, all my item IDs had a length of 32 (but both providers were still setup as VariableLength/255)

     

    When the error occured, i have the following items in both providers:

    Provider 1 (8 items):

    "EDE2CA5FB32E4F1A9F024A04ED5C3D15"
    "040000008200E00074C5B7101A82E00800000000503C03AC60D8C8010000000000000000100000002669607FDC41C141AA3D0ED0049C6E62"
    "040000008200E00074C5B7101A82E00800000000709E3EE160D8C801000000000000000010000000118D880BE3A7D74CA1A12D45B8480C3C"
    "24B51B08E0CC4059A31818E5771FF758"
    "040000008200E00074C5B7101A82E00800000000102E640FA9D7C801000000000000000010000000A527ED3B885ACF47B2BE0DA6694F1EB9"
    "040000008200E00074C5B7101A82E00800000000E03B92DAA8D7C80100000000000000001000000002B06616091AE74CB1B8A1FF535FD69A"
    "040000008200E00074C5B7101A82E00800000000A0B87A6DA5D7C80100000000000000001000000076BC57518919BB46B54AB6AD67437ACD"
    "CD0000008B9511D182D800C04FB1625D3804E2C644DD6E418BB6094BD660C3FC"

     

    Provider 2 (4 items):

    "EDE2CA5FB32E4F1A9F024A04ED5C3D15"
    "040000008200E00074C5B7101A82E00800000000503C03AC60D8C8010000000000000000100000002669607FDC41C141AA3D0ED0049C6E62"
    "040000008200E00074C5B7101A82E00800000000709E3EE160D8C801000000000000000010000000118D880BE3A7D74CA1A12D45B8480C3C"
    "24B51B08E0CC4059A31818E5771FF758"


     

    Any help would be greatly appreciated,

    Thanks

    Alexandre

    Friday, June 27, 2008 4:07 PM
  • This is a known issue in CTP2 bits and will be fixed in the later release.

    Currently the work around is to use fix length item id.

    Sorry for the inconvenience.
    Friday, June 27, 2008 5:38 PM
    Answerer
  • Thanks Jin.

    What about the RC0 ?

    Using fixed length would not be a solution in my case... Hope it will be fixed soon.

     

    Alexandre

    Friday, June 27, 2008 9:43 PM
  • The metadata store is not shipped in SQL RC0, the Sync framework release will be out in a few months.

    Friday, June 27, 2008 10:42 PM
    Answerer
  • Hi Alexandre,

     

    If you can not use fixed ids as a workaround, there are two other workarounds you can use for CTP2:

    ·         Using batch size = 1 OR

    ·         Pad the ids so that they all have the same length.

     

    Tuesday, July 8, 2008 7:16 PM
  • Hi Jeremie,

     

    Thanks for your answer.

    I don't think i can patch the IDs since i don't have a complete control on the data store (to be more precise, i'm synchronizing calendar items from Exchange, unique IDs are the calendar unique IDs automatically generated by Outlook or OWA on each calendar items).

     

    I will try the batch size 1 in any case, although i guess it will decrease the performance.

     

    Thank you the help !

    Alexandre

     

    Wednesday, July 16, 2008 4:34 PM
  •  

    If you can not add the padding directly to the store, you could add it in the providers:

    - Pad the ids in GetChangeBatch and when retrieving the destination versions

    - Remove the padding when saving changes to the store.

    You just have to make sure that all the providers in the community pad and unpad the ids the same way.

    Wednesday, July 16, 2008 5:11 PM
  • Thanks for the answer Jeremie, This is great. Padding the ID in the providers works perfectly !

     

    Alexandre

     

     

     

    Thursday, July 17, 2008 1:01 PM