Uploaded image for project: 'Mongoid'
  1. Mongoid
  2. MONGOID-4980

Atomic push incorrectly determines whether there is a conflict

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 7.2.0.rc1
    • Affects Version/s: None
    • Component/s: Persistence
    • None
    • Fully Compatible

      Atomic push conflict detection uses a regular expression match:

      -          (push_fields.keys.count { |item| item =~ /#{name}/ } > 1)
      

      This comparison permits a subset of the field name to match the field name. Comparisons should be for the entire field name.

      Note that field name is already determined to not contain any dots hence a "single component" comparison should be suitable.

            Assignee:
            oleg.pudeyev@mongodb.com Oleg Pudeyev (Inactive)
            Reporter:
            oleg.pudeyev@mongodb.com Oleg Pudeyev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: