[SERVER-31219] Get rid of getGlobalServiceContext Created: 22/Sep/17  Updated: 06/Dec/22  Resolved: 16/Mar/18

Status: Closed
Project: Core Server
Component/s: Internal Code
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Kaloian Manassiev Assignee: DO NOT USE - Backlog - Dev Tools
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-67478 Get rid of getGlobalServiceContext Backlog
related to SERVER-29519 Get rid of getGlobalReplicationCoordi... Closed
is related to SERVER-33460 Provide ServiceContext* when setting ... Closed
Assigned Teams:
Developer Tools
Sprint: Platforms 2018-01-01, Platforms 2018-01-15
Participants:

 Description   

The presence of a static globalServiceContext variable is an impediment to being able to write unit-tests, which contain different environments or storage engines and it should be removed.

The codebase seems to be pretty close to that goal.

As part of this change, we should:

  • Get rid of the SetGlobalEnvironment initializer
  • Pass the ServiceContext as part of the InitializerContext
  • Move all storage engine variables outside of ServiceContext and put them on a decoration


 Comments   
Comment by Henrik Edin [ 16/Mar/18 ]

See related ticket

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