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

Atomic push incorrectly determines whether there is a conflict

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor - P4
    • Resolution: Fixed
    • None
    • 7.2.0.rc1
    • Persistence
    • None
    • Fully Compatible

    Description

      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.

      Attachments

        Activity

          People

            oleg.pudeyev@mongodb.com Oleg Pudeyev
            oleg.pudeyev@mongodb.com Oleg Pudeyev
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: