[SERVER-20636] Move Command::testCommandsEnabled definition to its own library Created: 25/Sep/15 Updated: 15/Oct/15 Resolved: 07/Oct/15 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Code |
| Affects Version/s: | 3.1.8 |
| Fix Version/s: | 3.2.0-rc0 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Max Hirschhorn | Assignee: | Max Hirschhorn |
| Resolution: | Done | Votes: | 1 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Sprint: | TIG A (10/09/15) |
| Participants: |
| Description |
|
commands.cpp is build as part of the coredb library: https://github.com/mongodb/mongo/blob/r3.1.8/src/mongo/db/SConscript#L477. Some tests include commands.h and define a value for Command::testCommandsEnabled to avoid linking it in. It would be nice to make determining whether the server is in test mode (i.e. whether test commands are enabled) a more reasonable thing to do from a linkage perspective. This will be used by mongobridge to change dbclient.cpp and network_interface_asio_auth.cpp to include the server's host info in the initial isMaster command request only if the server is in test mode. |
| Comments |
| Comment by Githook User [ 13/Oct/15 ] |
|
Author: {u'username': u'visemet', u'name': u'Max Hirschhorn', u'email': u'max.hirschhorn@mongodb.com'}Message: |
| Comment by Githook User [ 07/Oct/15 ] |
|
Author: {u'username': u'visemet', u'name': u'Max Hirschhorn', u'email': u'max.hirschhorn@mongodb.com'}Message: |
| Comment by Githook User [ 07/Oct/15 ] |
|
Author: {u'username': u'visemet', u'name': u'Max Hirschhorn', u'email': u'max.hirschhorn@mongodb.com'}Message: Resolves some linkage debt to make it easier to check whether test |
| Comment by Max Hirschhorn [ 06/Oct/15 ] |
|
Based on discussions with Andy and Adam, we've decided to abandon the approach of having testCommandsEnabled being a decoration on the global service context. The mongo shell isn't allowed to have a ServiceContext, and having DBClientConnection taking a function to produce the initial isMaster command request is a more involved change than what is necessary for the mongobridge improvements. Instead, the definition of the static member Command::testCommandsEnabled will be moved to its own library. Updating the summary of this ticket to reflect this. |