[SERVER-43698] Don't allow atClusterTime where number of seconds in Timestamp is 0 Created: 27/Sep/19 Updated: 29/Oct/23 Resolved: 18/Oct/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Replication |
| Affects Version/s: | None |
| Fix Version/s: | 4.3.1 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Samyukta Lanka | Assignee: | Samyukta Lanka |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Backwards Compatibility: | Fully Compatible | ||||
| Operating System: | ALL | ||||
| Sprint: | Repl 2019-10-07, Repl 2019-10-21 | ||||
| Participants: | |||||
| Linked BF Score: | 14 | ||||
| Description |
|
When specifying atClusterTime, we will invariant if the seconds field of the provided timestamp is 0 (since that is the same as the timestamp being null). We should do validation for this sooner so that we can uassert instead of invariant-ing. |
| Comments |
| Comment by Githook User [ 18/Oct/19 ] |
|
Author: {'name': 'Samyukta Lanka', 'username': 'lankas', 'email': 'samy.lanka@mongodb.com'}Message: |
| Comment by Samyukta Lanka [ 15/Oct/19 ] |
|
One thing to note: the reason why we don't need to make a similar change for afterClusterTime is that there is a valid use case for specifying a timestamp with zero seconds. The OplogFetcher uses it to query for the no holes point. |
| Comment by Jack Mulrow [ 09/Oct/19 ] |
|
kaloian.manassiev, mongos doesn't allow requests with atClusterTime at all (checked here and tested here), so I don't think we need to worry about that. |
| Comment by Kaloian Manassiev [ 02/Oct/19 ] |
|
This should not cause any problem for sharding specifically, because we don't generate such null cluster times and as long as the operation times returned by replication on responses to writes are never null either, we should never be sending such invalid times to shards. That being said, I am not sure what happens if a customer sends atClusterTime request to MongoS with a null atClusterTime - I imagine this should be caught somewhere at the command level and not propagated to the storage engine, but it would be good if you guys can try it as part of this ticket? |
| Comment by Esha Maharishi (Inactive) [ 01/Oct/19 ] |
|
judah.schvimer, I don't know of any reason why it would. |
| Comment by Judah Schvimer [ 27/Sep/19 ] |
|
esha.maharishi, do you know if this will cause any problems for sharding? |