Uploaded image for project: 'MongoDB Database Tools'
  1. MongoDB Database Tools
  2. TOOLS-2058

mongoreplay does not show OP_MSG commands

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Critical - P2 Critical - P2
    • 4.1.1, 3.6.6, 4.0.1
    • Affects Version/s: 3.6.5, 4.0.0
    • Component/s: mongoreplay
    • Labels:
      None
    • 2
    • v4.0, v3.6

      Start `mongoreplay monitor` (I used master built from source):

      sudo mongoreplay monitor -i lo -e 'port 27017' -vvvv

      Launch a a mongod 4.0.0-rc5 and connect to it with a mongo shell 3.6, note the following output:

      14 Jun 18 14:06 -0400 (Connection: 1:13)  command isMaster admin.$cmd Request:{"client":{"application":{"name":"MongoDB Shell"},"driver":{"name":"MongoDB Internal Client","version":"3.6.5"},"os":{"architecture":"x86_64","name":"PRETTY_NAME=\"Debian GNU/Linux buster/sid\"","type":"Linux","version":"Kernel 4.16.0-1-amd64"}},"isMaster":1} 
      14 Jun 18 14:06 -0400 (Connection: 1:13) +306µs reply    Response:{"ismaster":true,"localTime":{"$date":"2018-06-14T18:06:48.595Z"},"maxBsonObjectSize":16777216,"maxMessageSizeBytes":48000000,"maxWireVersion":5,"maxWriteBatchSize":1000,"minWireVersion":0,"ok":1.0,"readOnly":false}
      

      Now run the following commands:

      db.test.insertOne({a:1})
      db.test.findOne()
      

      Note no output from mongoreplay.

      Stop mongod 4.0.0-rc5 and start mongod 3.4.15, the following output is shown by mongoreplay for find and insert commands:

      14 Jun 18 14:08 -0400 (Connection: 1:15)  op_command insert test Request:{"command_args":{"documents":[{"_id":{"$oid":"5b22af1f1e971bb0f223b066"},"a":1.0}],"insert":"test","ordered":true},"input_docs":[],"metadata":{}} 
      2018/06/14 14:08:31 Assembling TCP layer
      2018/06/14 14:08:31 stream 1 Connection 1: state 'Before Message'
      2018/06/14 14:08:31 stream 1 Connection 1: state 'In Message'
      2018/06/14 14:08:31 Assembling TCP layer
      2018/06/14 14:08:31 Assembling TCP layer
      2018/06/14 14:08:31 stream 1 Connection 1: state 'Before Message'
      2018/06/14 14:08:31 stream 1 Connection 1: state 'In Message'
      2018/06/14 14:08:31 Assembling TCP layer
      2018/06/14 14:08:31 stream 1 Connection 1: state 'Before Message'
      2018/06/14 14:08:31 stream 1 Connection 1: state 'In Message'
      14 Jun 18 14:08 -0400 (Connection: 1:15) +18.36ms op_commandreply    Response:{"command_reply":{"n":1,"ok":1.0},"metadata":{},"output_docs":[]}
      
      14 Jun 18 14:08 -0400 (Connection: 1:19)  op_command find test Request:{"command_args":{"filter":{},"find":"test","limit":1.0,"singleBatch":true},"input_docs":[],"metadata":{}} 
      14 Jun 18 14:08 -0400 (Connection: 1:19) +368µs op_commandreply    Response:{"command_reply":{"cursor":{"firstBatch":[{"_id":{"$oid":"5b22af1f1e971bb0f223b066"},"a":1.0}],"id":{"$numberLong":"0"},"ns":"test.test"},"ok":1.0},"metadata":{},"output_docs":[]}
      

            Assignee:
            david.golden@mongodb.com David Golden
            Reporter:
            oleg.pudeyev@mongodb.com Oleg Pudeyev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: