need $addToSetIfNotLast operator

XMLWordPrintableJSON

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

      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
            Reporter:
            Andrew Hodel
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: