...
BugZero found this defect 2787 days ago.
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 https://github.com/mongodb/mongo/blob/r3.5.6/src/mongo/db/ops/modifier_object_replace.cpp#L61 https://github.com/mongodb/mongo/blob/r3.5.6/src/mongo/db/ops/insert.cpp#L170 Implementation should provide backwards compatible behavior where the generated Timestamps are always unique.
asya commented on Fri, 31 Jul 2020 17:39:11 +0000: We're moving away from $currentDate since we added "$$NOW" to agg, is this ticket still relevant? SERVER-23656 sheeri.cabral commented on Thu, 9 Jan 2020 14:08:25 +0000: 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. tess.avitabile commented on Mon, 26 Jun 2017 20:13:16 +0000: If this work is done after SERVER-28766, be sure to change CurrentDateNode. misha.tyulenev commented on Fri, 23 Jun 2017 21:41:59 +0000: 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. renctan commented on Wed, 26 Apr 2017 21:30:58 +0000: They should be using something that is closely tied to the physical clock of the server, like one of the ClockSource from the ServiceContext. misha.tyulenev commented on Wed, 26 Apr 2017 21:19:27 +0000: renctan Can you please clarify what should be used instead?