[SERVER-29305] Make dbdirectclient call into assemble response through opcontext vtable Created: 19/May/17  Updated: 30/Oct/23  Resolved: 09/Jun/17

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

Type: Improvement Priority: Major - P3
Reporter: ADAM Martin (Inactive) Assignee: ADAM Martin (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-23103 Make library dependency graph acyclic Closed
Backwards Compatibility: Fully Compatible
Sprint: Platforms 2017-05-29, Platforms 2017-06-19
Participants:
Linked BF Score: 0

 Comments   
Comment by Githook User [ 09/Jun/17 ]

Author:

{u'username': u'adamlsd', u'name': u'ADAM David Alan Martin', u'email': u'adam.martin@10gen.com'}

Message: SERVER-29305 `DBDirectClient::call` uses OpContext

Presently it directly calls `assembleResponse`, which is responsible
for a cyclic dependency. This functionality is available through
the `ServiceContext` mechanism, and thus needn't directly use
`assembleResponse`.

The `ServiceEntryPoint` member of `ServiceContext` is set through
a setter, which isn't always called, so we initialize the global
entry through a factory function.

This also removes the superfluous argument for `HostAndPort`, as
that was used to track whether the call was made from within the
`DbDirectClient` object itself or from the network – a separate
bit in the `OperationContext` indicates that state.
Branch: master
https://github.com/mongodb/mongo/commit/6f6df7ff93c92f7917d46a0764d193d26f2ea9e9

Comment by Andrew Morrow (Inactive) [ 08/Jun/17 ]

Re-opened due to revert.

Comment by Githook User [ 08/Jun/17 ]

Author:

{u'username': u'jameswahlin', u'name': u'James Wahlin', u'email': u'james@mongodb.com'}

Message: Revert "SERVER-29305 `dbdirectclient::call` uses OpContext"

This reverts commit 36351fdb8642bed4fd977e8234b6ff16cf5e7da2.
Branch: master
https://github.com/mongodb/mongo/commit/60a4010587ed169a6f7e2709c150db2173e66514

Comment by Githook User [ 07/Jun/17 ]

Author:

{u'username': u'adamlsd', u'name': u'ADAM David Alan Martin', u'email': u'adam.martin@10gen.com'}

Message: SERVER-29305 `dbdirectclient::call` uses OpContext

Presently it directly calls `assembleResponse`, which is responsible
for a cyclic dependency. This functionality is available through
the `ServiceContext` mechanism, and thus needn't directly use
`assembleResponse`.

The `ServiceEntryPoint` member of `ServiceContext` is set through
a setter, which isn't always called, so we initialize the global
entry through a factory function.
Branch: master
https://github.com/mongodb/mongo/commit/36351fdb8642bed4fd977e8234b6ff16cf5e7da2

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