Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-2214

Test failure - test.test_transactions.TestTransactions.test_create_collection

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.11
    • Component/s: Tests
    • Labels:
      None

      Description

      The following test fails on v4.5-latest sharded clusters:

      ERROR: test_create_collection (test.test_transactions.TestTransactions)
      ----------------------------------------------------------------------
      Traceback (most recent call last):
        File "/Users/shane/git/mongo-python-driver/test/__init__.py", line 447, in wrap
          return f(*args, **kwargs)
        File "/Users/shane/git/mongo-python-driver/test/__init__.py", line 447, in wrap
          return f(*args, **kwargs)
        File "/Users/shane/git/mongo-python-driver/test/test_transactions.py", line 220, in test_create_collection
          coll.insert_one({}, session=s)
        File "/Users/shane/git/mongo-python-driver/pymongo/collection.py", line 694, in insert_one
          self._insert(document,
        File "/Users/shane/git/mongo-python-driver/pymongo/collection.py", line 609, in _insert
          return self._insert_one(
        File "/Users/shane/git/mongo-python-driver/pymongo/collection.py", line 598, in _insert_one
          self.__database.client._retryable_write(
        File "/Users/shane/git/mongo-python-driver/pymongo/mongo_client.py", line 1500, in _retryable_write
          return self._retry_with_session(retryable, func, s, None)
        File "/Users/shane/git/mongo-python-driver/pymongo/mongo_client.py", line 1393, in _retry_with_session
          return func(session, sock_info, retryable)
        File "/Users/shane/git/mongo-python-driver/pymongo/collection.py", line 586, in _insert_command
          result = sock_info.command(
        File "/Users/shane/git/mongo-python-driver/pymongo/pool.py", line 594, in command
          return command(self.sock, dbname, spec, slave_ok,
        File "/Users/shane/git/mongo-python-driver/pymongo/network.py", line 150, in command
          helpers._check_command_response(
        File "/Users/shane/git/mongo-python-driver/pymongo/helpers.py", line 161, in _check_command_response
          raise OperationFailure(msg % errmsg, code, response)
      pymongo.errors.OperationFailure: Transaction e0a4ad34-86f2-4cb0-9450-32a6fb13609a:1 was aborted on statement 1 due to: an error from cluster data placement change :: caused by :: Encountered error from localhost:27019 during a transaction :: caused by :: sharding status of collection pymongo_test.test_create_collection is not currently known and needs to be recovered
      

      I've opened SERVER-47809 as this looks like a regression in the server from 4.4.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              shane.harvey Shane Harvey
              Reporter:
              shane.harvey Shane Harvey
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: