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

Improper use of map::operator[]

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.9.0
    • Affects Version/s: None
    • Component/s: Storage
    • Labels:
      None
    • Fully Compatible
    • ALL
    • Sharding 2021-03-08
    • 58

      A pin lookup for a request uses operator[] which, as we all know, instantiates a default constructed version of the value type. A successful pin isn't bothered by this default construction (the default constructed value will be overwritten), but a failing pin should leave the key/value non-existent (if that was the pre-state). Failure to do so makes it seem as if there's a pin request when there is none.

            Assignee:
            daniel.gottlieb@mongodb.com Daniel Gottlieb (Inactive)
            Reporter:
            daniel.gottlieb@mongodb.com Daniel Gottlieb (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: