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

sort stage must ensure validity of key even when sorting parallel arrays

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.6.0-rc2
    • Affects Version/s: 2.5.5
    • Component/s: Querying
    • Labels:
      None
    • Environment:
      ubuntu
    • Linux

      I got this assert when doing query and sort. Its random but always show up once a while.

      My code was doing the following in a loop for testing, I have around 300 documents in my collection:

      ret1_cur = collection1.find({}).sort( [('B', -1), ('C', 1), ('A', 1)])
      ret1 = [i for i in ret1_cur]
      

      And I got the following assert once a while:
      Traceback (most recent call last):

          ret1 = [i for i in ret1_cur]
        File "/usr/local/lib/python2.7/dist-packages/pymongo/cursor.py", line 904, in next
          if len(self.__data) or self._refresh():
        File "/usr/local/lib/python2.7/dist-packages/pymongo/cursor.py", line 848, in _refresh
          self.__uuid_subtype))
        File "/usr/local/lib/python2.7/dist-packages/pymongo/cursor.py", line 800, in __send_message
          self.__uuid_subtype)
        File "/usr/local/lib/python2.7/dist-packages/pymongo/helpers.py", line 100, in _unpack_response
          error_object["$err"])
      OperationFailure: database error: assertion src/mongo/bson/bsonobjiterator.h:80
      

            Assignee:
            hari.khalsa@10gen.com hari.khalsa@10gen.com
            Reporter:
            sduan Steve Duan
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: