Uploaded image for project: 'Realm Core'
  1. Realm Core
  2. RCORE-2015

Add collection type to Clear instructions

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Sync
    • None

      With collections in mixed, we run into unexpected behavior when clearing collections.

      Consider the following case:

      1. Property set to List and items are inserted in the list
      2. Client 1 clears the list
      3. Client 2 sets property to Dictionary and inserts items in the dictionary

      With the current OT rules, the clients end up with an empty dictionary (Clear wins over Update). But since the type of the collection was just changed, the insertion should survive too (so Clear should lose in this case).

      By adding the collection type to Clear instructions, we can update the OT rules and handle merging clear instructions with sentinel instructions.

            Assignee:
            daniel.tabacaru@mongodb.com Daniel Tabacaru
            Reporter:
            daniel.tabacaru@mongodb.com Daniel Tabacaru
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: