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

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

    • Type: Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 3.4.7, 3.5.12
    • Labels:
      None
    • ALL

      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.

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

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

              Created:
              Updated:
              Resolved: