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

UnorderedFastKeyTable methods size() and empty() incorrect if elements erased

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.7.7
    • Affects Version/s: None
    • Component/s: Internal Code
    • Labels:
      None
    • ALL

      UnorderedFastKeyTable<>::erase() does not update member variable _size. As a result, a successful call to erase() will leave the map in a corrupt state: any subsequent calls to size() will include erased members in the returned count, and any subsequent calls to empty() will never return true.

      Callers of size() or empty() on instantiations of StringMap or BSONElementMap are potentially affected.

            Assignee:
            rassi J Rassi
            Reporter:
            rassi J Rassi
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: