[SERVER-41859] logical_time_metadata.js shouldn't assume lastApplied opTime equals $clusterTime Created: 21/Jun/19  Updated: 29/Oct/23  Resolved: 02/Jul/19

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 3.6.14, 4.0.11, 4.2.0-rc3, 4.3.1

Type: Bug Priority: Major - P3
Reporter: Jack Mulrow Assignee: Jack Mulrow
Resolution: Fixed Votes: 0
Labels: sharding-wfbf-day
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.2, v4.0, v3.6
Sprint: Sharding 2019-07-15
Participants:
Linked BF Score: 22

 Description   

logical_time_metadata.js runs replSetGetStatus and asserts the timestamp of the lastApplied opTime returned will exactly equal the $clusterTime timestamp in the response's metadata. The metadata is generated after the command's execution, and it's possible concurrent activity (like an index build for the config.cache collections) advances the latest cluster time before metadata is computed, leading $clusterTime to be greater than the returned lastApplied opTime.

To handle this, the test should be updated to assert $clusterTime is >= the lastApplied opTime.



 Comments   
Comment by Githook User [ 11/Jul/19 ]

Author:

{'name': 'Jack Mulrow', 'email': 'jack.mulrow@mongodb.com', 'username': 'jsmulrow'}

Message: SERVER-41859 logical_time_metadata.js shouldn't assume lastApplied opTime equals $clusterTime

(cherry picked from commit 624ffeeb25a8982f32295053d30ae1fe000cc15b)
Branch: v3.6
https://github.com/mongodb/mongo/commit/b144043147a069692aa5e0953c80d86cfc7e2511

Comment by Githook User [ 11/Jul/19 ]

Author:

{'name': 'Jack Mulrow', 'username': 'jsmulrow', 'email': 'jack.mulrow@mongodb.com'}

Message: SERVER-41859 logical_time_metadata.js shouldn't assume lastApplied opTime equals $clusterTime

(cherry picked from commit 624ffeeb25a8982f32295053d30ae1fe000cc15b)
Branch: v4.0
https://github.com/mongodb/mongo/commit/31aec585088323750207e2a27e030acb82cd4766

Comment by Githook User [ 11/Jul/19 ]

Author:

{'name': 'Jack Mulrow', 'email': 'jack.mulrow@mongodb.com', 'username': 'jsmulrow'}

Message: SERVER-41859 logical_time_metadata.js shouldn't assume lastApplied opTime equals $clusterTime

(cherry picked from commit 624ffeeb25a8982f32295053d30ae1fe000cc15b)
Branch: v4.2
https://github.com/mongodb/mongo/commit/31efab485d7c128cbaa0f2c702fa71b8e90f8107

Comment by Githook User [ 02/Jul/19 ]

Author:

{'name': 'Jack Mulrow', 'username': 'jsmulrow', 'email': 'jack.mulrow@mongodb.com'}

Message: SERVER-41859 logical_time_metadata.js shouldn't assume lastApplied opTime equals $clusterTime
Branch: master
https://github.com/mongodb/mongo/commit/624ffeeb25a8982f32295053d30ae1fe000cc15b

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