-
Type: Bug
-
Resolution: Works as Designed
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Labels:None
-
ALL
-
Execution Team 2022-03-07
AutoGetCollectionForReadCommandMaybeLockFree::operator bool is supposed to be a shortcut to AutoGetCollectionForReadCommandMaybeLockFree::getCollection::operator bool, i.e. it returns true if a collection with the provided namespace exists, or false otherwise. However, in the case where such a collection does not exists, it appears that it is not behaving as expected:
AutoGetCollectionForReadCommandMaybeLockFree coll{...}; // Collection does not exist logd("coll {} coll->getCollection() {}", static_cast<bool>(coll), static_cast<bool>(coll->getCollection()));
coll true coll->getCollection() false