[SERVER-28982] $currentDate modifiers should not use LogicalClock as source Created: 26/Apr/17 Updated: 06/Dec/22 |
|
| Status: | Backlog |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | 3.5.6 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Randolph Tan | Assignee: | Backlog - Query Execution |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Assigned Teams: |
Query Execution
|
||||||||||||||||
| Operating System: | ALL | ||||||||||||||||
| Sprint: | Sharding 2017-06-19 | ||||||||||||||||
| Participants: | |||||||||||||||||
| Description |
|
Esepcially when we switch the time to be purely logical. Here are the instances in the code that needs to be fixed: https://github.com/mongodb/mongo/blob/r3.5.6/src/mongo/db/ops/modifier_current_date.cpp#L232 Implementation should provide backwards compatible behavior where the generated Timestamps are always unique. |
| Comments |
| Comment by Asya Kamsky [ 31/Jul/20 ] |
|
We're moving away from $currentDate since we added "$$NOW" to agg, is this ticket still relevant? |
| Comment by Sheeri Cabral (Inactive) [ 09/Jan/20 ] |
|
I feel the query team should determine whether subsystems using $currentDate should rely on it to be unique, and then we can figure out what to do from there. $currentDate modifiers should be based on actual clock, not logical clock. |
| Comment by Tess Avitabile (Inactive) [ 26/Jun/17 ] |
|
If this work is done after |
| Comment by Misha Tyulenev [ 23/Jun/17 ] |
|
While testing the changes realized that its not safe because there is no uniqueness guarantees. It may affect tools like mongooplog that insert currentDate into oplog. |
| Comment by Randolph Tan [ 26/Apr/17 ] |
|
They should be using something that is closely tied to the physical clock of the server, like one of the ClockSource from the ServiceContext. |
| Comment by Misha Tyulenev [ 26/Apr/17 ] |
|
renctan Can you please clarify what should be used instead? |