BugZero found this defect 19 days ago.
Data sources
All data on this page is proprietary to BugZero® or gathered from public sources
5/15/2024
MongoDB Server
No affected releases provided.
No fixed releases provided.
While testing a isMember call in the profiler, I spotted that SERVER-51537 changed the temp variable for a call to values() from being a reference to being a full type, leading to a deep copy of the hash table: } else if (arrTag == value::TypeTags::ArraySet) { + // An empty ArraySet may not have a collation, but we don't need one to definitively + // determine that the empty set doesn't contain the value we are checking. auto arrSet = value::getArraySetView(arrVal); - auto& values = arrSet->values(); - - const bool found = values.find({inputTag, inputVal}) != values.end(); - - return {false, value::TypeTags::Boolean, value::bitcastFrom(found)}; + if (arrSet->size() == 0) { + return {false, value::TypeTags::Boolean, value::bitcastFrom(false)}; + } + auto values = arrSet->values();