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

need $addToSetIfNotLast operator

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 6.1.0-rc2
    • Component/s: None
    • None
    • ALL

      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.

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

              Created:
              Updated:
              Resolved: