[SERVER-33585] Do not return $clusterTime when no keys are available Created: 01/Mar/18  Updated: 29/Oct/23  Resolved: 26/Mar/18

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 3.6.5, 3.7.4

Type: Task Priority: Major - P3
Reporter: Misha Tyulenev Assignee: Misha Tyulenev
Resolution: Fixed Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Problem/Incident
causes SERVER-34843 Mongod can return operationTime great... Closed
Related
is related to SERVER-31916 Initial request to a shardsvr mongod ... Closed
Backwards Compatibility: Fully Compatible
Backport Requested:
v3.6
Sprint: Sharding 2018-03-26, Sharding 2018-04-09
Participants:

 Description   

The problem

There are occasional errors while starting up mongodb replica set detailed in SERVER-31916.
The question is if the change similar to the shell fix to wait for the clusterTime signature should be implemented in all drivers or if its possible to fix in the server.
On the server side this call
https://github.com/mongodb/mongo/blob/r3.7.2/src/mongo/db/service_entry_point_mongod.cpp#L289
returns the dummy signature from mongod if the keys are not there yet. Its necessary for the proper replica set start up.

The solution

Its ok to not return $clusterTime if there are no keys available. The internal clients always use the internal user to communicate to each other - its a different code path. Returning no signature to external clients only in the case when auth is on will fix problems in SERVER-31916



 Comments   
Comment by Githook User [ 11/May/18 ]

Author:

{'name': 'Misha Tyulenev', 'email': 'misha@mongodb.com', 'username': 'mikety'}

Message: SERVER-33585 do not return clusterTime when no keys are available
Branch: v3.6
https://github.com/mongodb/mongo/commit/a20ecd3e3a174162052ff99913bc2ca9a839d618

Comment by Githook User [ 26/Mar/18 ]

Author:

{'email': 'misha@mongodb.com', 'name': 'Misha Tyulenev', 'username': 'mikety'}

Message: SERVER-33585 do not return clusterTime when no keys are available
Branch: master
https://github.com/mongodb/mongo/commit/152885358a4ecab312c690b2ffee5dfb7c37311a

Comment by Bernie Hackett [ 01/Mar/18 ]

This ^.

Drivers know how to handle not getting a cluster time. They can't handle getting a broken cluster time.

Comment by Shane Harvey [ 01/Mar/18 ]

What if the dummy $clusterTime is never sent to external clients but is still sent internally to mongod/mongos so that the replica set can start properly?

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