https://github.com/mongodb/mongo/blob/5c66978ef79a68d916f86bfbe778dacad655691e/src/mongo/db/catalog_raii.cpp#L187