|
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
|
|