[SERVER-18930] Implement output doc downconversion in LegacyReplyBuilder Created: 11/Jun/15  Updated: 05/Feb/16  Resolved: 08/Jul/15

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

Type: Task Priority: Major - P3
Reporter: Adam Midvidy Assignee: Misha Tyulenev
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-18929 Add method to get how many bytes can ... Closed
Backwards Compatibility: Fully Compatible
Sprint: Platform 5 06/26/16, Platform 6 07/17/15
Participants:

 Description   

Currently appending output documents is a no-op on a LegacyReplyBuilder.

To use output documents in find and getMore commands we will need to implement it as such:

The LegacyReplyBuilder will stash the command reply internally after downconverting it instead of immediately appending it to the message. Then when done() is called, it will downconvert the outputdocs to an inner field of the command reply (the format of find and getMore responses is detailed here: https://docs.google.com/document/d/1RDlyPRSr8zgl3vNTb56wOy7RzVooBytR5DqlIt8fG4w/edit#).

A complication arises due to the slightly different format of find and getMore reponses ("firstBatch" vs "nextBatch"). We will probably need to do something ugly here eventually, but the initial version can just always downconvert the output docs to the "firstBatch" format until we start modifying the find/getMore commands to use the replyBuilder directly.

cc: david.storch



 Comments   
Comment by Githook User [ 08/Jul/15 ]

Author:

{u'username': u'mikety', u'name': u'Misha Tyulenev', u'email': u'misha@mongodb.com'}

Message: SERVER-18930 SERVER-19060 SERVER-19132 SERVER-19133 Implement LegacyReply(Builder) API and up/down conversions
Branch: master
https://github.com/mongodb/mongo/commit/5bd86559ad505c1219bd3f9ad8775b1594669381

Generated at Thu Feb 08 03:49:16 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.