-
Type: Bug
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Tools and Replicator
-
1
Problem
Mongorestore converts legacy index specs to prevent index creations on the source from erroring. For example, a legacy index (that persisted across upgrades) may have an index key value of 0. 3.4+ server versions no longer allow index key values of 0.
It currently incorrectly converts an index key value less than -1 x 10^9 to 1 (ascending). The server treats these legacy index keys as -1 (descending).
(see mongorestore's risk assessment.)
Solution & Acceptance Criteria
Mongorestore convertLegacyIndexes function should only convert float64s >= 0 to 1.
Impact
This bug can cause a legacy index with key less than -1 x 10^9 on the source to be built with key: 1 on the destination. This means that the destination cluster will treat the index as ascending while the source treats it as descending. This can cause unexpected performance issues for users.
- is related to
-
SERVER-96766 Verify behavior of pre-3.4 index key specs on 3.4+ versions
- Open