[SERVER-27035] rs.compareOpTimes() throws exception when comparing with empty OpTime Created: 15/Nov/16 Updated: 05/Apr/17 Resolved: 22/Dec/16 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Replication |
| Affects Version/s: | None |
| Fix Version/s: | 3.4.3, 3.5.2 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Judah Schvimer | Assignee: | Jack Mulrow |
| Resolution: | Done | Votes: | 0 |
| Labels: | neweng | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||
| Operating System: | ALL | ||||||||||||||||
| Backport Requested: |
v3.4
|
||||||||||||||||
| Sprint: | Repl 2016-12-12, Repl 2017-01-23 | ||||||||||||||||
| Participants: | |||||||||||||||||
| Description |
|
This is causing a lot of exceptions to be thrown in tests that look like errors but are really expected behavior. If we want an exception to be thrown, an empty optime should be a special case with a different message or at least the error should print the optimes. An example is here: The following throws an exception, when the empty OpTime should probably just be considered earlier.
|
| Comments |
| Comment by Githook User [ 06/Feb/17 ] | |
|
Author: {u'username': u'jsmulrow', u'name': u'Jack Mulrow', u'email': u'jack.mulrow@mongodb.com'}Message: (cherry picked from commit 2f33ffa96f630df133aa9670e9d9810bfbcca714) | |
| Comment by Githook User [ 22/Dec/16 ] | |
|
Author: {u'username': u'jsmulrow', u'name': u'Jack Mulrow', u'email': u'jack.mulrow@mongodb.com'}Message: | |
| Comment by Judah Schvimer [ 02/Dec/16 ] | |
|
For this ticket we want rs.compareOpTimes() to first check if either OpTime is empty, and if so it should throw with a more helpful message:
| |
| Comment by Eric Milkie [ 28/Nov/16 ] | |
|
I think we should just do | |
| Comment by Spencer Brody (Inactive) [ 15/Nov/16 ] | |
|
This was introduced in https://github.com/mongodb/mongo/commit/a38156adf985f57861f7f00e1dfa24183abcc105 |