[SERVER-54276] Refactor the Plan Executor to return specific reply types for command invocations Created: 03/Feb/21 Updated: 06/Dec/22 |
|
| Status: | Backlog |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Shreyas Kalyan | Assignee: | Backlog - Replication Team |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Assigned Teams: |
Replication
|
| Participants: |
| Description |
|
Currently, commands like ListIndexes call the PlanExecutor to generate a BSON Object of representing a single index return item for the command invocation. We would instead like the PlanExecutor to accept a type of xCmd and return an object of type xReplyItem (in the case of ListIndexes, we would want it to accept a type of ListIndexesCmd and return a type of ListIndexesReplyItem) so that we do not have to parse the BSON Object. We would have to make the PlanExecutor be able to return multiple types, as ListCollections calls the same functions on the PlanExecutor as well. |
| Comments |
| Comment by Samyukta Lanka [ 04/Feb/21 ] |
|
This also would involve a larger refactor of ListCollections and ListIndexes to construct the reply directly in their respective IDL-generated type rather than going through BSON. For listIndexes this might require changes to how we store index specs in the catalog, since those are currently stored as BSON. For listCollections, this involves changing how we build the object we pass to the plan executor. |