[SERVER-15281] UnorderedFastKeyTable methods size() and empty() incorrect if elements erased Created: 17/Sep/14 Updated: 11/Jul/16 Resolved: 18/Sep/14 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Code |
| Affects Version/s: | None |
| Fix Version/s: | 2.7.7 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | J Rassi | Assignee: | J Rassi |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Operating System: | ALL |
| Participants: |
| Description |
|
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. |
| Comments |
| Comment by Githook User [ 18/Sep/14 ] |
|
Author: {u'username': u'jrassi', u'name': u'Jason Rassi', u'email': u'rassi@10gen.com'}Message: |