-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Fully Compatible
-
Sharding 2019-12-30, Sharding 2020-01-13
$currentDate was deprecated under SERVER-42007. With this deprecation, mongod now logs the following message at server startup:
2019-12-09T15:17:13.221-0500 W WRITE [LogicalSessionCacheRefresh] The $currentDate update operator is deprecated. As an alternative perform updates with an aggregation pipeline and either the 'NOW' or 'CLUSTER_TIME' system variables.
As a replacement, we could use $$NOW within a $expr in the query part of the corresponding update.