test_transaction_starts_with_batched_write (added in PYTHON-2915) is failing on sharded clusters only with PyPy:
[2021/10/05 21:22:07.180] ERROR [14.316s]: test_transaction_starts_with_batched_write (test_transactions.TestTransactions) [2021/10/05 21:22:07.180] ---------------------------------------------------------------------- [2021/10/05 21:22:07.180] Traceback (most recent call last): [2021/10/05 21:22:07.180] File "/data/mci/20e52b1073912b1a352192790347280c/src/test/__init__.py", line 551, in wrap [2021/10/05 21:22:07.180] return f(*args, **kwargs) [2021/10/05 21:22:07.180] File "/data/mci/20e52b1073912b1a352192790347280c/src/test/__init__.py", line 551, in wrap [2021/10/05 21:22:07.180] return f(*args, **kwargs) [2021/10/05 21:22:07.180] File "/data/mci/20e52b1073912b1a352192790347280c/src/test/test_transactions.py", line 305, in test_transaction_starts_with_batched_write [2021/10/05 21:22:07.180] coll.bulk_write(ops, session=session) [2021/10/05 21:22:07.180] File "/data/mci/20e52b1073912b1a352192790347280c/src/pymongo/collection.py", line 433, in bulk_write [2021/10/05 21:22:07.180] bulk_api_result = blk.execute(write_concern, session) [2021/10/05 21:22:07.180] File "/data/mci/20e52b1073912b1a352192790347280c/src/pymongo/bulk.py", line 448, in execute [2021/10/05 21:22:07.180] return self.execute_command(generator, write_concern, session) [2021/10/05 21:22:07.180] File "/data/mci/20e52b1073912b1a352192790347280c/src/pymongo/bulk.py", line 345, in execute_command [2021/10/05 21:22:07.180] self.is_retryable, retryable_bulk, s, self) [2021/10/05 21:22:07.180] File "/data/mci/20e52b1073912b1a352192790347280c/src/pymongo/mongo_client.py", line 1300, in _retry_with_session [2021/10/05 21:22:07.180] return self._retry_internal(retryable, func, session, bulk) [2021/10/05 21:22:07.180] File "/data/mci/20e52b1073912b1a352192790347280c/src/pymongo/mongo_client.py", line 1332, in _retry_internal [2021/10/05 21:22:07.180] return func(session, sock_info, retryable) [2021/10/05 21:22:07.180] File "/data/mci/20e52b1073912b1a352192790347280c/src/pymongo/bulk.py", line 340, in retryable_bulk [2021/10/05 21:22:07.180] retryable, full_result) [2021/10/05 21:22:07.180] File "/data/mci/20e52b1073912b1a352192790347280c/src/pymongo/bulk.py", line 294, in _execute_command [2021/10/05 21:22:07.180] result, to_send = bwc.execute(cmd, ops, client) [2021/10/05 21:22:07.180] File "/data/mci/20e52b1073912b1a352192790347280c/src/pymongo/message.py", line 737, in execute [2021/10/05 21:22:07.180] result = self.write_command(cmd, request_id, msg, to_send) [2021/10/05 21:22:07.180] File "/data/mci/20e52b1073912b1a352192790347280c/src/pymongo/message.py", line 820, in write_command [2021/10/05 21:22:07.180] reply = self.sock_info.write_command(request_id, msg) [2021/10/05 21:22:07.180] File "/data/mci/20e52b1073912b1a352192790347280c/src/pymongo/pool.py", line 788, in write_command [2021/10/05 21:22:07.180] helpers._check_command_response(result, self.max_wire_version) [2021/10/05 21:22:07.180] File "/data/mci/20e52b1073912b1a352192790347280c/src/pymongo/helpers.py", line 170, in _check_command_response [2021/10/05 21:22:07.180] raise OperationFailure(errmsg, code, response, max_wire_version) [2021/10/05 21:22:07.180] pymongo.errors.OperationFailure: Encountered error from localhost:27218 during a transaction :: caused by :: Transaction 1 has been aborted., full error: {'ok': 0.0, 'errmsg': 'Encountered error from localhost:27218 during a transaction :: caused by :: Transaction 1 has been aborted.', 'code': 251, 'codeName': 'NoSuchTransaction', '$clusterTime': {'clusterTime': Timestamp(1633468894, 2), 'signature': {'hash': b'?H\xde\x7f\xbd\xb3\xd3\xa6\x13QqH\xa2\xe1\xb8\xb8\x0bp\x00\x8f', 'keyId': 7015691647652462616}}, 'operationTime': Timestamp(1633468894, 2), 'errorLabels': ['TransientTransactionError']}
On non-PyPy variants this test passes like this:
[2021/10/05 21:21:19.103] test_transaction_starts_with_batched_write (test_transactions.TestTransactions) ... ok (2.609s)
It's curious that it only fails on PyPy and that the runtime is much slower 14.3s vs 2.6s.
- is caused by
-
PYTHON-2915 Session persistence failure under transaction callback with large Bulk ops
- Closed
- links to