[SERVER-3304] Change comparison order so all Dates sort before all Timestamps Created: 21/Jun/11 Updated: 27/Oct/15 Resolved: 09/Jan/15 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | None |
| Fix Version/s: | 2.8.0-rc5 |
| Type: | Bug | Priority: | Critical - P2 |
| Reporter: | Aaron Staple | Assignee: | Mathias Stearn |
| Resolution: | Done | Votes: | 0 |
| Labels: | query_triage | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Backwards Compatibility: | Minor Change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Steps To Reproduce: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Description |
|
Queries (including range queries) on one type will no longer match values of the other type. Previously the comparison depended on which type was on the left hand side, which is incompatible with a total ordering. Original title: mongod assertion when attempt is made to compare a Date to a Timestamp The assertion will happen when the collection contains a Date and the query filter is using a Timestamp, but not the other way around. Here's the assertion and stack trace from a mongod running version 2.4.7.
|
| Comments |
| Comment by Githook User [ 07/Jan/15 ] |
|
Author: {u'username': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}Message: Make BSONObj::woCompare a total ordering Changes:
There should be no changes in any of the cases where woCompare defined a Related tickets:
Changes to the comparison function for aggregation will be handled separately |
| Comment by Githook User [ 01/Oct/14 ] |
|
Author: {u'username': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}Message: This should be unnecessary once |
| Comment by Githook User [ 01/Oct/14 ] |
|
Author: {u'username': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}Message: This should be unnecessary once |
| Comment by Michael Cahill [ 03/Sep/14 ] |
|
Is https://github.com/mongodb/mongo/pull/764 a reasonable way to address this issue? It is causing problems in testing the WiredTiger storage engine because the type3.js test causes comparison between a Date and a Timestamp. Thanks! |