[SERVER-20884] ReplyBuilderInterface should have a way to expose the builder's buffer to Command::run() Created: 12/Oct/15  Updated: 24/Nov/15  Resolved: 13/Nov/15

Status: Closed
Project: Core Server
Component/s: Networking
Affects Version/s: None
Fix Version/s: 3.2.0-rc3

Type: Improvement Priority: Major - P3
Reporter: David Storch Assignee: Adam Midvidy
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-20853 Eliminate copies of result batch in f... Closed
Duplicate
is duplicated by SERVER-21651 Assertion 34348 when mongo shell v3.2... Closed
Backwards Compatibility: Major Change
Sprint: Platform B (10/30/15), Platform C (11/20/15)
Participants:

 Description   

This can avoid extra copies of the command response in the RPC layer.



 Comments   
Comment by Adam Midvidy [ 16/Nov/15 ]

jonathan.abrahams, this is expected behavior as this changes the wire protocol of OP_COMMAND from rc3 to be slightly different than the protocol used in rc2 and the previous 3.1.x development release series. Note that we do not claim to provide backwards compatibility between development releases, and the shell from our previous stable release (3.0.7) will still work against a 3.2.0-rc3 server.

If you need to use a pre 3.2.0-rc3 shell, have the shell use OP_QUERY only by passing the
--rpcProtocols=opQueryOnly option on the command line.

Comment by Jonathan Abrahams [ 16/Nov/15 ]

The affect of this change means that mongo shell (3.2.0-rc2) cannot communicate with mongod 3.2.-rc3:

mongo 52.91.136.249
MongoDB shell version: 3.2.0-rc2
connecting to: 52.91.136.249/test
2015-11-16T09:52:25.571-0500 E QUERY    [thread1] Error: error doing query: failed :
DB.prototype.runCommand@src/mongo/shell/db.js:132:1
DB.prototype.adminCommand@src/mongo/shell/db.js:149:12
shellHelper.show@src/mongo/shell/utils.js:772:23
shellHelper@src/mongo/shell/utils.js:591:15
@(shellwarnings:1:1
 
2015-11-16T09:52:25.573-0500 I NETWORK  [thread1] trying reconnect to 52.91.136.249:27017 (52.91.136.249) failed
2015-11-16T09:52:25.602-0500 I NETWORK  [thread1] reconnect 52.91.136.249:27017 (52.91.136.249) ok
> show dbs
2015-11-16T09:52:40.946-0500 I NETWORK  [thread1] trying reconnect to 52.91.136.249:27017 (52.91.136.249) failed
2015-11-16T09:52:41.004-0500 I NETWORK  [thread1] reconnect 52.91.136.249:27017 (52.91.136.249) ok
2015-11-16T09:52:41.017-0500 E QUERY    [thread1] Error: error doing query: failed :
DB.prototype.runCommand@src/mongo/shell/db.js:132:1
Mongo.prototype.getDBs@src/mongo/shell/mongo.js:51:15
shellHelper.show@src/mongo/shell/utils.js:697:19
shellHelper@src/mongo/shell/utils.js:591:15
@(shellhelp2):1:1
 
2015-11-16T09:52:41.020-0500 I NETWORK  [thread1] trying reconnect to 52.91.136.249:27017 (52.91.136.249) failed
2015-11-16T09:52:41.045-0500 I NETWORK  [thread1] reconnect 52.91.136.249:27017 (52.91.136.249) ok

Steps performed on OSX:

  1. wget https://fastdl.mongodb.org/osx/mongodb-osx-x86_64-latest.tgz
  2. tar -xzf mongodb-osx-x86_64-latest.tgz
  3. mongodb-osx-x86_64-3.2.0-rc2-206-g7790034/bin/mongod --dbpath /tmp --port 34567
  4. wget https://fastdl.mongodb.org/osx/mongodb-osx-x86_64-3.2.0-rc2.tgz
  5. tar -xzf mongodb-osx-x86_64-3.2.0-rc2.tgz
  6. mongodb-osx-x86_64-3.2.0-rc2/bin/mongo --port 34567
Comment by Adam Midvidy [ 13/Nov/15 ]

This change breaks rolling upgrade from rc2 to rc3.

Comment by Githook User [ 13/Nov/15 ]

Author:

{u'username': u'amidvidy', u'name': u'Adam Midvidy', u'email': u'amidvidy@gmail.com'}

Message: SERVER-20884 remove duplicate invariant
Branch: master
https://github.com/mongodb/mongo/commit/918423eeb6fd8674b5f9802c7cea33643f421b95

Comment by Githook User [ 13/Nov/15 ]

Author:

{u'username': u'amidvidy', u'name': u'Adam Midvidy', u'email': u'amidvidy@gmail.com'}

Message: SERVER-20884 build command replies in-place to avoid copies
Branch: master
https://github.com/mongodb/mongo/commit/289d3fdf5c9d5b232b383c6cd871de1b75cf76b4

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