[SERVER-45030] Replace use of $currentDate with $$NOW in sessions_collection.cpp Created: 09/Dec/19  Updated: 29/Oct/23  Resolved: 07/Jan/20

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 4.3.3

Type: Task Priority: Major - P3
Reporter: James Wahlin Assignee: Tommaso Tocci
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: Sharding 2019-12-30, Sharding 2020-01-13
Participants:

 Description   

$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.



 Comments   
Comment by Githook User [ 07/Jan/20 ]

Author:

{'name': 'Tommaso Tocci', 'email': 'tommaso.tocci@10gen.com', 'username': 'toto-dev'}

Message: SERVER-45030 Replace use of $currentDate with $$NOW
Branch: master
https://github.com/mongodb/mongo/commit/47a810f853921657acb78db1110590c0c380091f

Generated at Thu Feb 08 05:07:40 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.