[SERVER-19543] Dynamically change config protocol in mongos and shard servers Created: 23/Jul/15  Updated: 25/Jan/17  Resolved: 19/Aug/15

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

Type: New Feature Priority: Major - P3
Reporter: Andy Schwerin Assignee: Spencer Brody (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-19969 Update config server connection strin... Closed
is depended on by SERVER-19875 Switch to using the LockManager to gu... Closed
is depended on by SERVER-1448 Host sharding config data on a replic... Closed
Related
is related to SERVER-19869 Prevent active CatalogManager from ch... Closed
Backwards Compatibility: Fully Compatible
Sprint: Sharding 8 08/28/15
Participants:

 Description   

Using the config protocol version information from SERVER-19539, mongos and shard nodes in sharded clusters should dynamically select the implementation of the sharding CatalogManager they use. Because they will need to change this value at runtime, during an upgrade, access to the catalog manager will need to be guarded by a lock. To achieve this, the lock manager will be introduced to mongos, and a new lock class outside the regular intent hierarchy will be introduced. Users of the catalog manager will acquire this lock in MODE_IX and the process that changes the manager in use will acquire the lock in MODE_X.

Dynamic selection of the catalog manager will be performed every time a new connection to a config server is performed. If the ismaster handshake indicates that the config server is running a different protocol from the mongos or shard server's catalog manager, the catalog operation will fail as though a network error occurred, but not before scheduling a separate task to replace the catalog manager implementation.

It is an open question whether the operation that fails should be automatically retried after the catalog manager is replaced.

If the config server reports a configsvr protocol version unsupported by the shard or mongos node, the node should allow the operation to fail and not replace its catalog manager. It may also log an error, but we should make an effort not to spam the logs.



 Comments   
Comment by Githook User [ 20/Aug/15 ]

Author:

{u'username': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@mongodb.com'}

Message: SERVER-19543 Wait for CSRS primary to report ismaster:true during csrs_upgrade.js
Branch: master
https://github.com/mongodb/mongo/commit/ff3666e060eac47fcba04bfa58cf2dcdf77de620

Comment by Githook User [ 20/Aug/15 ]

Author:

{u'username': u'stbrody', u'name': u'Spencer T Brody', u'email': u'spencer@mongodb.com'}

Message: SERVER-19543 Step down first config server before starting it in CSRS mode
Branch: master
https://github.com/mongodb/mongo/commit/f87d361fa48cf7a720a5e5a7bc67c0ca15fad1f5

Comment by Githook User [ 19/Aug/15 ]

Author:

{u'username': u'kaloianm', u'name': u'Kaloian Manassiev', u'email': u'kaloian.manassiev@mongodb.com'}

Message: SERVER-19543 Catalog manager switch in Parallel Sorted Cursor and commands

The ParallelSortClusteredCursor and commands execution logic in mongos
talk to the config servers through means, which are outside of the catalog
manager.

This change ensures that they would not propagate the Incompatible Catalog
Manager exception and will block until the change happens.
Branch: master
https://github.com/mongodb/mongo/commit/bdb98ebfdfaef2387d0920d7fcac5a003f84d3ee

Comment by Githook User [ 19/Aug/15 ]

Author:

{u'username': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@mongodb.com'}

Message: SERVER-19543 In csrs_upgrade.js, wait for CSRS primary to exit drain mode.
Branch: master
https://github.com/mongodb/mongo/commit/b88954346cfd1a53e8afc989b24ad9bcdca3f86a

Comment by Githook User [ 19/Aug/15 ]

Author:

{u'username': u'stbrody', u'name': u'Spencer T Brody', u'email': u'spencer@mongodb.com'}

Message: SERVER-19543 Propagate IncompatibleCatalogManager exception from SyncClusterConnection::prepare
Branch: master
https://github.com/mongodb/mongo/commit/fbcc87e0db680d96501615246b4c4d8a8831a1b5

Comment by Githook User [ 19/Aug/15 ]

Author:

{u'username': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@mongodb.com'}

Message: SERVER-19543 Basic config server replica set upgrade jstest.
Branch: master
https://github.com/mongodb/mongo/commit/5aa2373caef21db826f72281dde5ecb60a9bf6ff

Comment by Githook User [ 19/Aug/15 ]

Author:

{u'username': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@mongodb.com'}

Message: SERVER-19543 Code in ForwardingCatalogManager to handle replacing the actual catalog manager.
Branch: master
https://github.com/mongodb/mongo/commit/eee8ea23ae90ccd55e8336bfb54cb7dc792fe035

Comment by Githook User [ 19/Aug/15 ]

Author:

{u'username': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@mongodb.com'}

Message: SERVER-19543 Differentiate between shutting down catalog manager for replacement and for process shutdown.
Branch: master
https://github.com/mongodb/mongo/commit/9718ed34cd29915c81fe91f145ea3f0ef2925c64

Comment by Githook User [ 19/Aug/15 ]

Author:

{u'username': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@mongodb.com'}

Message: SERVER-19543 Correctly propagate statuses out of legacy config upgrade code.
Branch: master
https://github.com/mongodb/mongo/commit/b386c053fea367aff9711dd6323af7b4772fa96e

Comment by Githook User [ 19/Aug/15 ]

Author:

{u'username': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@mongodb.com'}

Message: SERVER-19543 Split CatalogManager into pure interface and abstract class.

The abstract class is CatalogManagerCommon, and the interface is
CatalogManager. ForwardingCatalogManager needs to implement a pure
interface, to ensure that it properly intercepts all operations to
handle retries.
Branch: master
https://github.com/mongodb/mongo/commit/f92dc91ae0b3c050aaa63797906a3f84f5267113

Comment by Githook User [ 19/Aug/15 ]

Author:

{u'username': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@mongodb.com'}

Message: SERVER-19543 Use ForwardingCatalogManager to acquire distributed locks outside catalog managers.

Makes the grid.catalogManager() return a ForwardingCatalogManager* and
eliminates the CatalogManagerGuard, as guard functionality will be
internal to ForwardingCatalogManager.
Branch: master
https://github.com/mongodb/mongo/commit/1b410805cf1e06051f9d14a20f176859a0130080

Comment by Githook User [ 18/Aug/15 ]

Author:

{u'username': u'stbrody', u'name': u'Spencer T Brody', u'email': u'spencer@mongodb.com'}

Message: SERVER-19543 SERVER-19992 Move ConfigServerMode enum from ServerGlobalParams to CatalogManager
Branch: master
https://github.com/mongodb/mongo/commit/5dd1be3ba35121f4ba501c322d48041ae748ac9c

Comment by Githook User [ 18/Aug/15 ]

Author:

{u'username': u'stbrody', u'name': u'Spencer T Brody', u'email': u'spencer@mongodb.com'}

Message: SERVER-19543 Add connection hook for checking config server mode to connections used by SyncClusterConnection
Branch: master
https://github.com/mongodb/mongo/commit/594d851e53c85b2711db41034f9d42e1a0a5c25d

Comment by Githook User [ 18/Aug/15 ]

Author:

{u'username': u'stbrody', u'name': u'Spencer T Brody', u'email': u'spencer@mongodb.com'}

Message: SERVER-19543 Throw exception in sharding connection hook if catalog manager needs swapping
Branch: master
https://github.com/mongodb/mongo/commit/4c00f062fd6f29b6f5547ffbc0117c684fddafac

Comment by Githook User [ 18/Aug/15 ]

Author:

{u'username': u'renctan', u'name': u'Randolph Tan', u'email': u'randolph@10gen.com'}

Message: SERVER-19543 Propagate IncompatibleCatalogManager when doing config writes
Branch: master
https://github.com/mongodb/mongo/commit/1e17edc60ba9bcbc47466e99326b569c62377958

Comment by Githook User [ 18/Aug/15 ]

Author:

{u'username': u'renctan', u'name': u'Randolph Tan', u'email': u'randolph@10gen.com'}

Message: SERVER-19543 Propagate IncompatibleCatalogManager error from MultiHostQuery
Branch: master
https://github.com/mongodb/mongo/commit/e798acc5319d379281f03a7bbc8b9bd0d45cf5a7

Comment by Andy Schwerin [ 17/Aug/15 ]

https://github.com/mongodb/mongo/commit/934c760404cdeb693ac72b04373b2efe659b79df

Comment by Githook User [ 17/Aug/15 ]

Author:

{u'username': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@mongodb.com'}

Message: SERVER-19543 ForwardingCatalogManager

The ForwardingCatalogManager is an indirection layer that will allow for
dynamic switching of catalog manager implementations at runtime, to
facilitate upgrade.
Branch: master
https://github.com/mongodb/mongo/commit/4031c68bcb2ad2e6c357752eb6fe1ed8602e2e95

Comment by Githook User [ 13/Aug/15 ]

Author:

{u'username': u'stbrody', u'name': u'Spencer T Brody', u'email': u'spencer@mongodb.com'}

Message: SERVER-19543 Don't store a pointer to the CatalogManager in the ShardRegistry
Branch: master
https://github.com/mongodb/mongo/commit/8753f23bbdb410e9bad71b042d4fa11e399f96b8

Comment by Githook User [ 13/Aug/15 ]

Author:

{u'username': u'stbrody', u'name': u'Spencer T Brody', u'email': u'spencer@mongodb.com'}

Message: SERVER-19543 Don't store a pointer to the CatalogManager in the CatalogCache
Branch: master
https://github.com/mongodb/mongo/commit/09782102cc6d8d2f824ddc31b6ac87bf20582cd4

Comment by Githook User [ 12/Aug/15 ]

Author:

{u'username': u'stbrody', u'name': u'Spencer T Brody', u'email': u'spencer@mongodb.com'}

Message: SERVER-19543 Always access the CatalogManager through a guard object that protects it from being swapped out
Branch: master
https://github.com/mongodb/mongo/commit/0973863c4e39b119e792f0e228f0233285640e84

Comment by Githook User [ 12/Aug/15 ]

Author:

{u'username': u'stbrody', u'name': u'Spencer T Brody', u'email': u'spencer@mongodb.com'}

Message: SERVER-19543 Thread OperationContext through to everywhere that accesses the CatalogManager
Branch: master
https://github.com/mongodb/mongo/commit/be7db282c80c981882ea67f909eb6be4e53d2d4b

Generated at Thu Feb 08 03:51:19 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.