-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Aggregation Framework, Querying
-
Labels:None
-
Fully Compatible
-
v3.6
-
Query 2017-11-13, Query 2017-12-04
Since DocumentSources are linked into both mongos and mongod, aggregation stage code must access functionality specific to mongod or mongos via the MongoProcessInterface. This interface also serves a dependency injection role, as it prevents the aggregation framework from having to declare a dependency on other submodules of mongos and mongod.
Prior to the introduction of the MongoProcessInterface, a separate mechanism was added to provide similar functionality specifically for the test-only $listLocalSessions stage: the GenericCursorInterface. This interface abstracts over the mongod and mongos cursor managers. These two interfaces serve essentially the same purpose, and should therefore be merged. Specifically, we can do so by creating MongoProcessInterface::getCursors() and deleting the GenericCursorManager.