[SERVER-29652] mongos should not gossip $logicalTime until admin.system.keys are created Created: 15/Jun/17  Updated: 30/Oct/23  Resolved: 22/Jun/17

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

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

Issue Links:
Depends
is depended on by SERVER-29754 Remove checks for featureCompatibilit... Closed
Backwards Compatibility: Fully Compatible
Sprint: Sharding 2017-06-19, Sharding 2017-07-10
Participants:

 Description   

In shards and config servers the featureCompatibilityVersion is available. This is however not the case for mongos which is currently uses the featureCompatibilityVersion correlated to its binary.

This causes a problem in causal consistency as mongos will be trying to sign the outgoing requests and will block waiting on the keys. This is not acceptable as the upgrade process may take very long time. Its possible that user upgrade the binaries but never issue setFeatureCompatibilityVersion command. So polling is not a good idea for mongos to discover its version.
To address that mongos will:
At startup check for keys. If no keys are found then mongos will eventually be checking for keys every 10 minutes (its already default behavior)
Check for keys immediately if the incoming messages contains proof to validate (its already default behavior)
If keys were never found do not add $logicalTime and operationTime to the command Response (its new)

This way mongos will eventually start using causal consistency within 10 minutes of actual upgrade.



 Comments   
Comment by Githook User [ 23/Jun/17 ]

Author:

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

Message: SERVER-29652 don't enable key generation in LogicalTimeValidatorTest::setUp()
Branch: master
https://github.com/mongodb/mongo/commit/763891dbeee9c3a3080410e916a4f1f081751d5f

Comment by Githook User [ 22/Jun/17 ]

Author:

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

Message: SERVER-29652 don't enable key generator too early in logical_time_validator_test
Branch: master
https://github.com/mongodb/mongo/commit/4a5b1dcf17f3235f3d60b481387f2bd46017d81f

Comment by Githook User [ 22/Jun/17 ]

Author:

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

Message: SERVER-29652 mongos should not gossip logical time until admin.system.keys is created
Branch: master
https://github.com/mongodb/mongo/commit/0d79ab8b66fcaf06bf5622de580ed5a85c95bc16

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