|
There are at least two situations where the Collection::infoCache method is called on a nullptr Collection object:
https://github.com/mongodb/mongo/blob/ff8ca92aafd08c17f93bf00bf7aeaac79643ad02/src/mongo/db/commands/write_commands/batch_executor.cpp#L1354
https://github.com/mongodb/mongo/blob/ff8ca92aafd08c17f93bf00bf7aeaac79643ad02/src/mongo/db/instance.cpp#L862
Adding a
will cause invariant failures at these locations when running the 'core' suite. Other locations that assume that the Collection pointer is valid before calling Collection::infoCache should probably also be checked.
|