Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-30864

Query from system.profile errors when executed on the same mongod

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Cannot Reproduce
    • 3.4.7, 3.5.12
    • None
    • None
    • ALL

    Description

      Short version: I successfully execute an aggregation framework query, which is logged into system.profile. Copy pasting the pipeline from system.profile back into the mongo shell, and executing against the same mongod instance, fails with various errors. Example error:

      assert: command failed: {
              "ok" : 0,
              "errmsg" : "$regex has to be a string",
              "code" : 2,
              "codeName" : "BadValue"
      } : aggregate failed
      _getErrorWithCode@src/mongo/shell/utils.js:25:13
      doassert@src/mongo/shell/assert.js:16:14
      assert.commandWorked@src/mongo/shell/assert.js:370:5
      DBCollection.prototype.aggregate@src/mongo/shell/collection.js:1319:5
      @(shell):1:1
       
      2017-08-28T18:13:14.977+0300 E QUERY    [thread1] Error: command failed: {
              "ok" : 0,
              "errmsg" : "$regex has to be a string",
              "code" : 2,
              "codeName" : "BadValue"
      } : aggregate failed :
      _getErrorWithCode@src/mongo/shell/utils.js:25:13
      doassert@src/mongo/shell/assert.js:16:14
      assert.commandWorked@src/mongo/shell/assert.js:370:5
      DBCollection.prototype.aggregate@src/mongo/shell/collection.js:1319:5
      @(shell):1:1
      > 
      

      The aggregation pipeline originally comes from the tpch test suite of sqlproxy. I will post a more detailed repro in a dev-only comment.

      Attachments

        1. tpch.js
          2.17 MB
        2. tpch.query2.js
          16 kB

        Issue Links

          Activity

            People

              david.storch@mongodb.com David Storch
              henrik.ingo@mongodb.com Henrik Ingo (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: