-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Index Maintenance, Querying
-
Minor Change
-
ALL
Consider the following BSON objects, in shell notation.
a = { x: NumberLong("72057594037927936") } b = { x: 72057594037927936.0 } c = { x: NumberLong("72057594037927937") } // c.x == a.x+1
The following expressions all evaluate to true.
bsonWoCompare(a, b) == bsonWoCompare(b, a) == 0 bsonWoCompare(a, c) == -1 bsonWoCompare(c, b) == 0
So, a < c is true, a < b and b < a are false, and c < b and b < c are false. This lack of a total ordering means that you can construct an index on field x where document c occurs either before or after document a, due to the presence of documents like b.
- is related to
-
SERVER-3717 loss of precision for long long values in v1 index
- Closed
- related to
-
SERVER-6126 Value::compare is not a transitive comparison for certain numeric values
- Closed