locked
Increasing the Tick - Causing Conflicts on Simultaneous Deletes (ManagedNTFSProvider + Custom Providers) RRS feed

  • Question

  • Hi,

    I'm currently running into a conflict issue and I've found the problem. But before I start implementing a solution I'm actually thinking about whether problem really should be a problem.

    Based on the ManagedNTFSProvider I created my own custom provider. Basic sync in both directions with deletes works.

    The scenario that causes the conflict is the following:

    I have a synced object (ObjA) in both data stores.
    I deleted the object in BOTH stores.

    For simplicity let's say both providers are at a tick count = 1.
    Then I run a Download only Sync from the RemoteProvider to LocalProvider.

    The code is mostly based on the NTFS sample, so:
    My local provider's GetChangeBatch method is called and I notice ObjA is deleted, so I change the metdata to a tombstone and give it UpdateVersion = 1 (=Tick for LocalProvider)
    (The ReplicaID is not important here, so it's left out)

    Then my remote provider's ProcessChangeBatch method is called.
    In the NTFS sample you increase the tick at the beginning. So do I, so RemoteProvider now has a tick count = 2.
    Then I find local changes and see that ObjA was deleted here too.
    So I tombstone the metadata, give it a MetaData.UpdateVersion = 2 (=Tick for RemoteProvider)

    This is where the problem appears. I now have conflicting deletes (because of the different versions/ticks), even though they were actually done at the same time.

    I could of course change the position of the tick increase in ProcessChangeBatch or increase it in GetChangeBatch aswell or even implement some conflict handling, but I'm don't think this situation should be a conflict. Maybe I'm having a logical problem here.

    These deletes are not really conflicting, or are they? If so, why? They occured at the same time, so they should just be deleted, or not?

    Any help or thoughts appreciated.
    Regards,
    Alex




    • Moved by Max Wang_1983 Thursday, April 21, 2011 10:15 PM forum consolidation (From:SyncFx - Technical Discussion [ReadOnly])
    Saturday, February 9, 2008 6:13 PM

Answers

  • GREAT question and apologies in the delay!

     

    Technically, a delete-delete conflict is detected because indeed, these actions were taken independently without “knowledge” of the other’s action but as you point out, most providers will want to just take the action of deleting the item and don’t think of this as a conflict. Why doesn’t the sync framework auto-resolve this on behalf of the provider?  Great suggestion and one we’re looking to investigate in terms of potential impact to scenarios involving local vs. remote deletes (think media and devices where licenses are involved) or other scenarios with the context of the deletes could be different based on the endpoints (ghosting, as an example)

     

    Thanks,

    -Moe

     

     

    Sunday, February 17, 2008 12:32 AM

All replies

  • GREAT question and apologies in the delay!

     

    Technically, a delete-delete conflict is detected because indeed, these actions were taken independently without “knowledge” of the other’s action but as you point out, most providers will want to just take the action of deleting the item and don’t think of this as a conflict. Why doesn’t the sync framework auto-resolve this on behalf of the provider?  Great suggestion and one we’re looking to investigate in terms of potential impact to scenarios involving local vs. remote deletes (think media and devices where licenses are involved) or other scenarios with the context of the deletes could be different based on the endpoints (ghosting, as an example)

     

    Thanks,

    -Moe

     

     

    Sunday, February 17, 2008 12:32 AM
  • Thanks. That makes sense.
    Tuesday, February 19, 2008 8:55 PM