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

unrecognized field 'useNewUpsert' with sharded cluster running 4.2.1

    • Type: Icon: Bug Bug
    • Resolution: Gone away
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None

      It is not possible to run Collection.aggregate or Collection.count_document with pymongo against a sharded cluster. It returns

      Traceback (most recent call last):
       File "/scripts/mongo_exporter.py", line 23, in <module>
       query_result = write_col.aggregate([
       File "/usr/local/lib/python3.8/site-packages/pymongo/collection.py", line 2375, in aggregate
       return self._aggregate(_CollectionAggregationCommand,
       File "/usr/local/lib/python3.8/site-packages/pymongo/collection.py", line 2297, in _aggregate
       return self.__database.client._retryable_read(
       File "/usr/local/lib/python3.8/site-packages/pymongo/mongo_client.py", line 1464, in _retryable_read
       return func(session, server, sock_info, slave_ok)
       File "/usr/local/lib/python3.8/site-packages/pymongo/aggregation.py", line 136, in get_cursor
       result = sock_info.command(
       File "/usr/local/lib/python3.8/site-packages/pymongo/pool.py", line 603, in command
       return command(self.sock, dbname, spec, slave_ok,
       File "/usr/local/lib/python3.8/site-packages/pymongo/network.py", line 165, in command
       helpers._check_command_response(
       File "/usr/local/lib/python3.8/site-packages/pymongo/helpers.py", line 159, in _check_command_response
       raise OperationFailure(msg % errmsg, code, response)
      pymongo.errors.OperationFailure: unrecognized field 'useNewUpsert'
      

      Same query runs just fine against a non sharded collection with the same data in there.
       

            Assignee:
            carl.champain@mongodb.com Carl Champain (Inactive)
            Reporter:
            alex.lepailleur@gmail.com Alex Lepailleur
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: