[SERVER-18084] 'Grid' should be dissolved into one or more decorations on ServiceContext Created: 16/Apr/15  Updated: 21/Jun/21  Resolved: 21/Jun/21

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

Type: Improvement Priority: Major - P3
Reporter: Kaloian Manassiev Assignee: Kaloian Manassiev
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Related
related to SERVER-23534 move miscellaneous methods off Grid Closed
related to SERVER-35445 Make global "grid" object a decoratio... Closed
Backwards Compatibility: Fully Compatible
Participants:
Linked BF Score: 0

 Description   

The Grid class used by sharding is currently a mix of storage for sharding-global objects plus some code, which will eventually go away.

This ticket is to move all such code out of grid.cpp and turn the Grid class into one or more decorations on ServiceContext.



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

Author:

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

Message: SERVER-18084 Do not expect `getShardMap` to succeed on a non-sharded system
Branch: master
https://github.com/mongodb/mongo/commit/d393b8dbd2a0550fd880474747a6a3e45c9ec798

Comment by Githook User [ 07/May/18 ]

Author:

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

Message: SERVER-18084 Get rid of direct references to 'grid'
Branch: master
https://github.com/mongodb/mongo/commit/ed6094a6bfbeddbeb24939ef11e363af733a6285

Comment by Githook User [ 27/Jul/17 ]

Author:

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

Message: SERVER-18084 Give ServiceContext to ShardingEgressMetadataHook

And remove its usages of grid in place of Grid::get()
Branch: master
https://github.com/mongodb/mongo/commit/adc2aa4991d3d11f1bfbe057ead70113211f6870

Comment by Githook User [ 16/Aug/16 ]

Author:

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

Message: SERVER-18084 Add Grid::get(ServiceContext*) getter

Also removes some references to the static 'grid' instance.
Branch: master
https://github.com/mongodb/mongo/commit/80801195df6055d4ba7f6f9c2bee2530cc87010d

Comment by Githook User [ 22/Sep/15 ]

Author:

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

Message: SERVER-18084 Remove usages of ShardingState::get(globalOperationContext())

So that call can be removed in place of the variant, which accepts
OperationContext.
Branch: master
https://github.com/mongodb/mongo/commit/9123d2d3263ea56d8651ba9d4cf5ad1158d939cb

Comment by Githook User [ 28/Jul/15 ]

Author:

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

Message: SERVER-18084 Cleanup includes
Branch: master
https://github.com/mongodb/mongo/commit/327e99adcbc1430682d59dfc50c74088f6ae29e8

Comment by Githook User [ 14/Jul/15 ]

Author:

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

Message: SERVER-18084 Modularize chunk migration state machine

  • Move the sharding migration destination (receiving side) management to a separate source file
  • Move the destination thread management to be owned by the destination manager
  • Move the sharding migration source (donor side) management to a separate source file
  • Remove the medianKey command since it is noop and not used anywhere

No migration logic changes.
Branch: master
https://github.com/mongodb/mongo/commit/00c74d1386d4678ebcdeb37878fbb3c53cb02d83

Comment by Githook User [ 14/Jul/15 ]

Author:

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

Message: SERVER-18084 Fix lint formatting violation
Branch: master
https://github.com/mongodb/mongo/commit/1e063e865082e75b8b92768fec218f50879daff1

Comment by Githook User [ 14/Jul/15 ]

Author:

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

Message: SERVER-18084 Make ShardingState a decoration on ServiceContext
Branch: master
https://github.com/mongodb/mongo/commit/3199feb9ab4a94962f7a45ff2262a18fe42ba7b4

Comment by Githook User [ 11/Jul/15 ]

Author:

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

Message: SERVER-18084 Move mongod metadata management to be under mongo/db

Moves the metadata management code specific to mongod under the mongo/db
directory along with its tests.
Branch: master
https://github.com/mongodb/mongo/commit/48432412d79d0712367837a12637d3682c04fddb

Comment by Githook User [ 11/Jul/15 ]

Author:

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

Message: SERVER-18084 Move code out of d_state.h/.cpp

Move the ShardingState/ShardedConnectionInfo classes out of d_state and
put them in separate sources under mongo/db.

No functional changes.
Branch: master
https://github.com/mongodb/mongo/commit/ac42068ddeaae27d2cd5cfc4808915491e5097c7

Comment by Githook User [ 17/Apr/15 ]

Author:

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

Message: SERVER-18084 grid.h should not include config.h

There is no reliance on any type from config.h by grid.h, which cannot be
just forward-declared.
Branch: master
https://github.com/mongodb/mongo/commit/2b08b38883fca56a38b8d4697e7e6606649379d9

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