[SERVER-40852] mongod_returns_no_cluster_time_without_keys.js should wait for shard primary to load cluster time keys Created: 26/Apr/19  Updated: 29/Oct/23  Resolved: 27/Aug/19

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

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

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Participants:
Linked BF Score: 16

 Description   

mongod_returns_no_cluster_time_without_keys.js starts up a sharded cluster and asserts that if there are keys in admin.system.keys, then responses to clients without the advanceClusterTimePrivilege from a shard primary will include $clusterTime. This isn't actually guaranteed right away because only mongos blocks during startup waiting for signing keys, not shards, and it's possible the shard primary may not have refreshed and loaded the keys into its KeyManager cache, which leads to a response with no $clusterTime.

This test should instead use an assert.soon() loop for the first request that expects $clusterTime from a shard since it should eventually load the keys and every response after that should be signed.



 Comments   
Comment by Githook User [ 26/Aug/19 ]

Author:

{'username': 'lamontnelson', 'email': 'lamont.nelson@mongodb.com', 'name': 'Lamont Nelson'}

Message: SERVER-40852: use assert.soon to wait for valid operation time
Branch: master
https://github.com/mongodb/mongo/commit/f062986a15452a25bd17aa485b706c1a60aacb6e

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