[SERVER-6452] Replace time(0) calls Created: 15/Jul/12  Updated: 10/May/22

Status: Backlog
Project: Core Server
Component/s: Internal Code
Affects Version/s: 2.0.6
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Ben Becker Assignee: DO NOT USE - Backlog - Platform Team
Resolution: Unresolved Votes: 0
Labels: move-sa, platforms-re-triaged, time
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-5112 Need a better story for startup-time ... Closed
Related
is related to SERVER-4740 Use monotonic clock sources for Timer Closed
Operating System: ALL
Participants:

 Description   

Although highly unlikely, time(0) can return a value of -1. This value is occasionally set during static initialization. For example, see:

dbwebserver.cpp:L46    time_t started = time(0); 

Tangentially, this specific variable is used by the replication logic in health.cpp and consensus.cpp, so dbwebserver.cpp probably isn't the best place to initialize.



 Comments   
Comment by Steven Vannelli [ 10/May/22 ]

Moving this ticket to the Backlog and removing the "Backlog" fixVersion as per our latest policy for using fixVersions.

Comment by Andy Schwerin [ 15/Jul/12 ]

Linked for the start-up time initialization part, not the time(0) part.

Generated at Thu Feb 08 03:11:44 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.