-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Sharding
-
Fully Compatible
-
ALL
-
16
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.