The metadata consistency checker is currently invoking $listCatalog on each shard and checking that a subset of the output is matching (the projected options).
Since $listCatalog is returning the whole catalog entry that also includes additional info other than the fields we're currently projececting, we should rather identify the subset of fields that must not be projected and compare all other fields in order to spot inconsistencies.
This would help us find issues as the one described in SERVER-90243: $listCatalog is returning the fields that are inconsistent, but we are never taking them into consideration in the consistency checker since they're not projected.
- is related to
-
SERVER-90243 ShardCollection/Chunk Migrations/Resharding do not clone some collection catalog options.
- Closed
-
SERVER-90768 Compare output between listCollections and $listCatalog for the same database and verify equivalence in testing
- In Code Review