init_atomic_updates from updatable.rb does not account for conflicts between set and unset commands

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Unknown
    • 9.1.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • Fully Compatible
    • Ruby Drivers
    • Not Needed
    • None
    • None
    • None
    • None
    • None
    • None

      init_atomic_updates calls atomic_updates which builds a Modifier hash of atomic operations by calling various operations depending on the update (set, pull, etc). Most of these operations will call set_conflict to ensure that there are no conflicts between between the current operation and another set operation, but unset does not call it at all. I think it should call it because an unset could be unsetting a field within another field that is set, and thereby cause a conflict. For instance, I should never get this when I call
      init_atomic_updates and I can, which causes an error when attempting to apply the updates: {"set" => {"a" => [

      {"b" => 1}

      ]}, "unset" => {"a.0.b" => true}}

            Assignee:
            Jamis Buck
            Reporter:
            Annie Gibson
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: