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

Aggregation cursor error message shouldn't swallow Runner error

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • 2.6.0
    • 2.7.2
    • Aggregation Framework
    • ALL
    • Hide

      var coll = db.getSiblingDB('newdb').agg;
      coll.drop();
      coll.ensureIndex({comments: "text"});
       
      coll.aggregate([{$match: {$or: [{$text: {$search: 'bar'}}, {foo:1}] }}, {$sort: {foo: 1}}]);

      Show
      var coll = db.getSiblingDB('newdb').agg; coll.drop(); coll.ensureIndex({comments: "text"});   coll.aggregate([{$match: {$or: [{$text: {$search: 'bar'}}, {foo:1}] }}, {$sort: {foo: 1}}]);

    Description

      Similar to SERVER-13715, aggregate() fails with an "exception: cursor encountered an error" message when combining $or, $text, and a blocking sort:

      > var coll = db.getSiblingDB('newdb').agg;
      > coll.drop();
      false
      > coll.ensureIndex({comments: "text"});
      {
      	"createdCollectionAutomatically" : true,
      	"numIndexesBefore" : 1,
      	"numIndexesAfter" : 2,
      	"ok" : 1
      }
       
      > coll.aggregate([{$match: {$or: [{$text: {$search: 'bar'}}, {foo:1}] }}, {$sort: {foo: 1}}]);
      assert: command failed: {
      	"errmsg" : "exception: cursor encountered an error",
      	"code" : 17285,
      	"ok" : 0
      } : aggregate failed
       


      Version: 2.6.2-rc0

      Attachments

        Issue Links

          Activity

            People

              rassi J Rassi
              kamran.khan Kamran K.
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: