-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Tools and Replicator
-
18
Problem Statement/Rationale
Due to SERVER-77374, mongodump might dump an unversioned 2dsphereIndex on a time-series collection. Mongorestore treats unversioned 2dsphereIndexes as legacy indexes and thus always attempts to create them as v1. Attempting to restore a v1 2dshpereIndex causes mongorestore to fail with an error like the one below:
Failed: test.timeseries_geonear_measurements_indexed: error creating indexes for test.timeseries_geonear_measurements_indexed: createIndex error: (CannotCreateIndex) Error in specification { name: "loc_2dsphere", 2dsphereIndexVersion: 1, key: { data.loc: "2dsphere_bucket" }, originalSpec: { key: { loc: "2dsphere" }, name: "loc_2dsphere", 2dsphereIndexVersion: 1, v: 2 }, v: 2 } :: caused by :: unsupported geo index version { 2dsphereIndexVersion : 2dsphereIndexVersion: 1 }, only versions: [3] are supported
Steps to Reproduce
- Create a time-series collection with 2dsphereIndex
- Use mongodump to dump the collection
- Run mongorestore to restore the collection with the 2dsphereIndex
Expected Results
Index restored with correct version.
Actual Results
Mongorestore failure.
Additional Notes
Discovered in passthrough test (link).
- is caused by
-
SERVER-77374 listIndexes on timeseries collection doesn’t include 2dsphereIndexVersion
-
- Closed
-