Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-69791

need $addToSetIfNotLast operator

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Done
    • 6.1.0-rc2
    • None
    • None
    • None
    • ALL

    Description

      This would allow for unique if not last entry into arrays.

       

      Preventing:

       

      ```

      ['one', 'one', 'two', 'three']

      ```

       

      But allowing:

       

      ```

      ['one', 'two', 'three', 'one']

      ```

       

      $addToSet was created because you cannot be expected to use locks at the database level when there is request logic on the server that depends on TCP because a the TCP timeout being able to block everything else.

       

      It's reasonable to expect that you would want unique if not last entries into an array.

      Attachments

        Activity

          People

            edwin.zhou@mongodb.com Edwin Zhou
            andrew@ispapp.co Andrew Hodel
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: