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

Avoid using readConcern snapshot in sharded transaction tests

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.9
    • Affects Version/s: None
    • Component/s: None
    • None

       [2019/07/02 22:06:35.816] ======================================================================
       [2019/07/02 22:06:35.816] ERROR [0.051s]: test_transactions_transaction_options_defaultTransactionOptions_override_client_options (test_transactions.TestTransactions)
       [2019/07/02 22:06:35.816] ----------------------------------------------------------------------
       [2019/07/02 22:06:35.816] Traceback (most recent call last):
       [2019/07/02 22:06:35.816]   File "/data/mci/cb2ee5cd4b43659603d74a398e413f60/src/test/__init__.py", line 410, in wrap
       [2019/07/02 22:06:35.816]     return f(*args, **kwargs)
       [2019/07/02 22:06:35.816]   File "/data/mci/cb2ee5cd4b43659603d74a398e413f60/src/test/__init__.py", line 410, in wrap
       [2019/07/02 22:06:35.816]     return f(*args, **kwargs)
       [2019/07/02 22:06:35.816]   File "/data/mci/cb2ee5cd4b43659603d74a398e413f60/src/test/__init__.py", line 410, in wrap
       [2019/07/02 22:06:35.816]     return f(*args, **kwargs)
       [2019/07/02 22:06:35.816]   File "/data/mci/cb2ee5cd4b43659603d74a398e413f60/src/test/test_transactions.py", line 342, in run_scenario
       [2019/07/02 22:06:35.816]     self.run_scenario(scenario_def, test)
       [2019/07/02 22:06:35.816]   File "/data/mci/cb2ee5cd4b43659603d74a398e413f60/src/test/utils_spec_runner.py", line 507, in run_scenario
       [2019/07/02 22:06:35.816]     self.run_operations(sessions, collection, test['operations'])
       [2019/07/02 22:06:35.816]   File "/data/mci/cb2ee5cd4b43659603d74a398e413f60/src/test/utils_spec_runner.py", line 342, in run_operations
       [2019/07/02 22:06:35.816]     result = self.run_operation(sessions, collection, op.copy())
       [2019/07/02 22:06:35.816]   File "/data/mci/cb2ee5cd4b43659603d74a398e413f60/src/test/utils_spec_runner.py", line 293, in run_operation
       [2019/07/02 22:06:35.816]     result = cmd(**dict(arguments))
       [2019/07/02 22:06:35.816]   File "/data/mci/cb2ee5cd4b43659603d74a398e413f60/src/pymongo/collection.py", line 697, in insert_one
       [2019/07/02 22:06:35.816]     session=session),
       [2019/07/02 22:06:35.816]   File "/data/mci/cb2ee5cd4b43659603d74a398e413f60/src/pymongo/collection.py", line 611, in _insert
       [2019/07/02 22:06:35.816]     bypass_doc_val, session)
       [2019/07/02 22:06:35.816]   File "/data/mci/cb2ee5cd4b43659603d74a398e413f60/src/pymongo/collection.py", line 599, in _insert_one
       [2019/07/02 22:06:35.816]     acknowledged, _insert_command, session)
       [2019/07/02 22:06:35.816]   File "/data/mci/cb2ee5cd4b43659603d74a398e413f60/src/pymongo/mongo_client.py", line 1484, in _retryable_write
       [2019/07/02 22:06:35.816]     return self._retry_with_session(retryable, func, s, None)
       [2019/07/02 22:06:35.816]   File "/data/mci/cb2ee5cd4b43659603d74a398e413f60/src/pymongo/mongo_client.py", line 1385, in _retry_with_session
       [2019/07/02 22:06:35.816]     return func(session, sock_info, retryable)
       [2019/07/02 22:06:35.816]   File "/data/mci/cb2ee5cd4b43659603d74a398e413f60/src/pymongo/collection.py", line 594, in _insert_command
       [2019/07/02 22:06:35.816]     retryable_write=retryable_write)
       [2019/07/02 22:06:35.816]   File "/data/mci/cb2ee5cd4b43659603d74a398e413f60/src/pymongo/pool.py", line 612, in command
       [2019/07/02 22:06:35.816]     user_fields=user_fields)
       [2019/07/02 22:06:35.816]   File "/data/mci/cb2ee5cd4b43659603d74a398e413f60/src/pymongo/network.py", line 158, in command
       [2019/07/02 22:06:35.816]     parse_write_concern_error=parse_write_concern_error)
       [2019/07/02 22:06:35.816]   File "/data/mci/cb2ee5cd4b43659603d74a398e413f60/src/pymongo/helpers.py", line 155, in _check_command_response
       [2019/07/02 22:06:35.816]     raise OperationFailure(msg % errmsg, code, response)
       [2019/07/02 22:06:35.816] OperationFailure: Transaction 806c7df4-3cf3-4839-987a-b4206e3974e6:1 was aborted on statement 0 due to: a non-retryable snapshot error :: caused by :: Encountered error from localhost:27217 during a transaction :: caused by :: Read timestamp Timestamp(1562119591, 69) is older than the oldest available timestamp.
       [2019/07/02 22:06:35.816] ----------------------------------------------------------------------
      

      This is happening all over the test suite since 6/27/2019. Seemingly something changed in server 4.3.x since none of the changes in PyMongo look related.

      Example failure:
      https://evergreen.mongodb.com/task/mongo_python_driver_tests_python_version_rhel62_test_ssl__platform~rhel62_auth~noauth_ssl~nossl_python_version~2.7_coverage~coverage_test_latest_sharded_cluster_26d25cd74effc1e7a8d52224eac6c9a95769b371_19_07_03_01_55_35

            Assignee:
            shane.harvey@mongodb.com Shane Harvey
            Reporter:
            bernie@mongodb.com Bernie Hackett
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: