[SERVER-39215] Fix aggregation_currentop.js such that we don't compare timestamps generated from 2 different sources (mozjs & server). Created: 25/Jan/19  Updated: 29/Oct/23  Resolved: 07/Feb/19

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: None
Fix Version/s: 4.0.7, 4.1.8

Type: Bug Priority: Minor - P4
Reporter: Suganthi Mani Assignee: Suganthi Mani
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Duplicate
is duplicated by SERVER-39214 Fix aggregation_currentop.js such tha... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.0
Sprint: Repl 2019-02-11, Repl 2019-02-25
Participants:
Linked BF Score: 11

 Description   

Windows 2015 doesn't support millisecond granularity for time, we calculate the time based on estimation. So, its possible transactionDocument.startWallClockTime (calculated by the server) can be behind timeBeforeTransactionStarts (calculated by mozjs) by few milliseconds.  Since, on windows 2015 , its not safe to compare the timestamps obtained from 2 different sources mozjs and server, and we already do have a check that verifies  that transactionDocument.startWallClockTime < transactionDocument.expiryTime, it is ok to just verify that  transactionDocument.startWallClockTime >  epoch timestamp (1970-01-01T00:00:00.000).

 Note: In Windows 2017, the problem got fixed as it can return high resolution timestamps. And, currently, on evergreen, the master branch is running on windows 2017. But, 4.0 branch is still using windows 2015.



 Comments   
Comment by Githook User [ 07/Feb/19 ]

Author:

{'name': 'Suganthi Mani', 'email': 'suganthi.mani@mongodb.com', 'username': 'smani87'}

Message: SERVER-39215 Fix aggregation_currentop.js such that we compare transactionDocument.startWallClockTime is greater than epoch time (1970-01-01T00:00:00.000).

(cherry picked from commit fd3a55180b5af9dfce2214326b70b75c6567f838)
Branch: v4.0
https://github.com/mongodb/mongo/commit/9b58aefbe75f06e28e58d630a6158217fa9745f8

Comment by Githook User [ 07/Feb/19 ]

Author:

{'name': 'Suganthi Mani', 'email': 'suganthi.mani@mongodb.com', 'username': 'smani87'}

Message: SERVER-39215 Fix aggregation_currentop.js such that we compare transactionDocument.startWallClockTime is greater than epoch time (1970-01-01T00:00:00.000).
Branch: master
https://github.com/mongodb/mongo/commit/fd3a55180b5af9dfce2214326b70b75c6567f838

Generated at Thu Feb 08 04:51:23 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.