[SERVER-23779] Replace explicit instantiation of OperationContextImpl with cc().makeOperationContext() Created: 18/Apr/16 Updated: 25/Jan/17 Resolved: 20/Apr/16 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Code |
| Affects Version/s: | None |
| Fix Version/s: | 3.3.5 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Andy Schwerin | Assignee: | Andy Schwerin |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Backwards Compatibility: | Fully Compatible | ||||
| Sprint: | Sharding 13 (04/22/16) | ||||
| Participants: | |||||
| Linked BF Score: | 0 | ||||
| Description |
|
Rather than instantiating OperationContextImpl directly on the stack and letting its constructor use thread-local variables to initialize itself, tests and other code needing an OperationContext should construct it from the current thread's client object, via cc().makeOperationContext(). This is more consistent with the Service/Client/Operation software architecture in place, and is what mongod and mongos user operations already do. |
| Comments |
| Comment by Githook User [ 20/Apr/16 ] |
|
Author: {u'username': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@mongodb.com'}Message: Also, make OperationContextImpl's constructor private so that it can only be |
| Comment by Eric Milkie [ 19/Apr/16 ] |
|
Reverted as the Solaris compiler with the old toolchain did not compile successfully. |
| Comment by Githook User [ 19/Apr/16 ] |
|
Author: {u'username': u'milkie', u'name': u'Eric Milkie', u'email': u'milkie@10gen.com'}Message: Revert " This reverts commit 0ab34aa7b9c3c48ea6cf17888620fca455284d35. |
| Comment by Githook User [ 19/Apr/16 ] |
|
Author: {u'username': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@mongodb.com'}Message: Also, make OperationContextImpl's constructor private so that it can |
| Comment by Githook User [ 18/Apr/16 ] |
|
Author: {u'username': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@mongodb.com'}Message: Instead, make operation contexts using Client::makeOperationContext. |