[SERVER-20467] Timestamps encoded incorrectly Created: 17/Sep/15  Updated: 07/Oct/15  Resolved: 21/Sep/15

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

Type: Bug Priority: Major - P3
Reporter: Bruce Lucas (Inactive) Assignee: Mark Benvenuto
Resolution: Done Votes: 0
Labels: FTDC
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Platform 9 (09/18/15)
Participants:

 Description   

Capturing samples, encoding, and decoding, all through the support tooling (POC) implementation, we get the following output after decoding for the replica set "optime" timestamps; the "t" fields of the "optime" field contain Unix epoch times that match the "optimeDate" fields:

"localTime" : { "$date" : "2015-09-17T13:56:00.013-0400" }"
"optime" : { "$timestamp" : { "t" : 1442512560, "i" : 2674 } }, "optimeDate" : { "$date" : "2015-09-17T13:56:00.000-0400" }
"optime" : { "$timestamp" : { "t" : 1442512524, "i" : 75913 } }, "optimeDate" : { "$date" : "2015-09-17T13:55:24.000-0400" }

Capturing samples and encoding using the server implementation, and then decoding through the support tooling decoder we get the following (for a sample captured at about the same time):

"localTime" : { "$date" : "2015-09-17T13:56:00.000-0400" },
"optime" : { "$timestamp" : { "t" : 1442580230, "i" : 189973 } }, "optimeDate" : { "$date" : "2015-09-17T13:55:59.000-0400" },
"optime" : { "$timestamp" : { "t" : 1442588416, "i" : 75913 } }, "optimeDate" : { "$date" : "2015-09-17T13:55:24.000-0400" },

The "t" fields of the "optime" timestamp don't match the "optimeDate" fields, and are off by about 70k seconds.



 Comments   
Comment by Githook User [ 21/Sep/15 ]

Author:

{u'username': u'markbenvenuto', u'name': u'Mark Benvenuto', u'email': u'mark.benvenuto@mongodb.com'}

Message: SERVER-20467: Timestamps encoded incorrectly
Branch: master
https://github.com/mongodb/mongo/commit/fa26f322c323f1ea913694bdc0e1b315c54665c9

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