[SERVER-66595] Add ServiceContext* parameter to PrimaryOnlyService::constructInstance Created: 19/May/22  Updated: 29/Oct/23  Resolved: 25/Jul/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 6.1.0-rc0

Type: Improvement Priority: Major - P3
Reporter: Randolph Tan Assignee: Tyler Brock
Resolution: Fixed Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Participants:

 Description   

Currently, callers are resorting to calling getGlobalServiceContext() which is not ideal (and can be confusing in tests where there are more than one service contexts).



 Comments   
Comment by Githook User [ 25/Jul/22 ]

Author:

{'name': 'Tyler Brock', 'email': 'tyler.brock@gmail.com', 'username': 'TylerBrock'}

Message: SERVER-66595 remove calls to getGlobalServiceContext in POS derived classes
Branch: master
https://github.com/mongodb/mongo/commit/0125582d71bebbdc5591281eab1b7f9759474fb0

Comment by Randolph Tan [ 18/Jul/22 ]

Looks like I was wrong, I thought service context fixtures have their own copy of service context, but it turns out, they don't.

Comment by Blake Oler [ 27/Jun/22 ]

It looks like the PrimaryOnlyService itself has a pointer to ServiceContext, should be trivial to implement.

Generated at Thu Feb 08 06:05:52 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.