Assertion db/query.cpp 727

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • None
    • Affects Version/s: 1.8.0-rc0
    • Component/s: Querying
    • None
    • Environment:
    • Linux
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      [Status]

      db.queue.findOne()
      {
      "_id" : ObjectId("4e9a90d9de142a0c5b392XYZ"),
      "_u" : "xxx-yyy-zzz",
      "status" : 1,
      "update_time" : 1318752472
      }

      "status" value can be 0, 1, 2

      db.queue.stats()
      {
      "ns" : "test.queue",
      "count" : 153794,
      "size" : 22760436,
      "avgObjSize" : 147.99300362822996,
      "storageSize" : 33327616,
      "numExtents" : 8,
      "nindexes" : 3,
      "lastExtentSize" : 12079360,
      "paddingFactor" : 1,
      "flags" : 1,
      "totalIndexSize" : 26050560,
      "indexSizes" :

      { "_id_" : 6406144, "_u_1" : 14622720, "update_time_1" : 5021696 }

      ,
      "ok" : 1
      }

      [Issues]

      When executing the find() command with 2 conditions like belowing

      db.queue.find({"_id":{$gt:ObjectId("000000000000000000000000")}, "status":{$gt:2}})

      The following error message has occurred,

      >> error:

      { "$err" : "assertion db/query.cpp:727" }

      However, when the filtering value for the second condition is in the range of "status" [0,1,2],
      like this, "status":{$gt:0}, it runs well.

      Notice that, "status" is not indexed and has only three integer value of 0, 1 or 2.
      Moreover, the number of document needs to be large enough, in my case it is about 153794 documents.

      [Detail]

      For your information, I think the problem lies in shared pointer _c in db/query.cpp.

      OK
      db.queue.find({"_id":{$gt:ObjectId("000000000000000000000000")}, "status":{$gt:0}})
      db.queue.find({"_id":{$gt:ObjectId("000000000000000000000000")}, "status":{$gt:1}})

      >> error:

      { "$err" : "assertion db/query.cpp:727" }

      db.queue.find({"_id":{$gt:ObjectId("000000000000000000000000")}, "status":{$gt:2}})
      db.queue.find({"_id":{$gt:ObjectId("000000000000000000000000")}, "status":{$gt:3}})

      OK
      db.queue.find({"_id":{$gt:ObjectId("000000000000000000000000")}, "status":{$lt:2}})

      >> error:

      { "$err" : "assertion db/query.cpp:727" }

      db.queue.find({"_id":{$gt:ObjectId("000000000000000000000000")}, "status":{$lt:0}})
      db.queue.find({"_id":{$gt:ObjectId("000000000000000000000000")}, "status":{$lt:1}})

            Assignee:
            Unassigned
            Reporter:
            Nguyen Minh Hai
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: