-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Catalog and Routing
-
ALL
-
None
-
0
-
None
-
None
-
None
-
None
-
None
-
None
Context
Currently we use `listCollections` and `listIndexes` commands to clone the collection options and indexes. Respectively in:
These functions are used at least by chunk migration and resharding.
Since listIndexes is a user facing command it returns the logical format. When we want to clone indexes from one node to another, I believe we should always use the raw format instead. This will avoid passing through 2 format translation layers (raw -> logical and then logical -> raw) and reduce the likelihood of errors.
Proposal
Use the internal $listCatalog stage instead. This stage returns a dump of the catalog without doing any transformation of the metadata. So it feels more safe than listCollections and listIndexes that instead do a lot of metadata massaging.
- depends on
-
SERVER-81037 Cluster the local durable catalog or index it by namespace
-
- Backlog
-
- is related to
-
SERVER-82221 listCollections and listIndexes should include commit-pending namespaces
-
- Closed
-
-
SERVER-90243 ShardCollection/Chunk Migrations/Resharding do not clone some collection catalog options.
-
- Closed
-
-
SERVER-95065 Replace listCollections with equivalent aggregation
-
- Backlog
-
-
SERVER-90768 Compare output between listCollections and $listCatalog for the same database and verify equivalence in testing
-
- Closed
-