-
Type:
Build Failure
-
Resolution: Fixed
-
Priority:
Unknown
-
Affects Version/s: None
-
Component/s: None
-
None
-
None
-
Python Drivers
-
Not Needed
-
-
None
-
None
-
None
-
None
-
None
-
None
test_collection_readConcern_without_transaction is failing on MMAP:
[2024/04/11 06:28:31.169] FAILURE: pymongo.errors.OperationFailure: Storage engine does not support read concern: { readConcern: { level: "majority" } }, full error: {'operationTime': Timestamp(1712842103, 9), 'ok': 0.0, 'errmsg': 'Storage engine does not support read concern: { readConcern: { level: "majority" } }', 'code': 148, 'codeName': 'ReadConcernMajorityNotEnabled', '$clusterTime': {'clusterTime': Timestamp(1712842103, 9), 'signature': {'hash': b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', 'keyId': 0}}} ()
[2024/04/11 06:28:31.169] self = <test.test_transactions_unified.TestUnifiedReads testMethod=test_collection_readConcern_without_transaction>
[2024/04/11 06:28:31.169] def test_case(self):
[2024/04/11 06:28:31.169] > self.run_scenario(spec)
[2024/04/11 06:28:31.169] test/unified_format.py:1904:
[2024/04/11 06:28:31.169] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[2024/04/11 06:28:31.169] test/unified_format.py:1851: in run_scenario
[2024/04/11 06:28:31.169] self._run_scenario(spec, uri)
[2024/04/11 06:28:31.169] test/unified_format.py:1881: in _run_scenario
[2024/04/11 06:28:31.169] self.run_operations(spec["operations"])
[2024/04/11 06:28:31.169] test/unified_format.py:1719: in run_operations
[2024/04/11 06:28:31.169] self.run_entity_operation(op)
[2024/04/11 06:28:31.169] test/unified_format.py:1461: in run_entity_operation
[2024/04/11 06:28:31.169] result = cmd(**dict(arguments))
[2024/04/11 06:28:31.169] test/unified_format.py:1272: in _collectionOperation_find
[2024/04/11 06:28:31.169] return list(find_cursor)
[2024/04/11 06:28:31.169] pymongo/cursor.py:1243: in next
[2024/04/11 06:28:31.169] if len(self.__data) or self._refresh():
[2024/04/11 06:28:31.169] pymongo/cursor.py:1160: in _refresh
[2024/04/11 06:28:31.169] self.__send_message(q)
[2024/04/11 06:28:31.169] pymongo/cursor.py:1040: in __send_message
[2024/04/11 06:28:31.169] operation, self._unpack_response, address=self.__address
[2024/04/11 06:28:31.169] pymongo/_csot.py:108: in csot_wrapper
[2024/04/11 06:28:31.169] return func(self, *args, **kwargs)
[2024/04/11 06:28:31.169] pymongo/mongo_client.py:1426: in _run_operation
[2024/04/11 06:28:31.169] operation=operation.name,
[2024/04/11 06:28:31.169] pymongo/mongo_client.py:1538: in _retryable_read
[2024/04/11 06:28:31.169] operation_id=operation_id,
[2024/04/11 06:28:31.169] pymongo/_csot.py:108: in csot_wrapper
[2024/04/11 06:28:31.169] return func(self, *args, **kwargs)
[2024/04/11 06:28:31.169] pymongo/mongo_client.py:1495: in _retry_internal
[2024/04/11 06:28:31.169] operation_id=operation_id,
[2024/04/11 06:28:31.169] pymongo/mongo_client.py:2342: in run
[2024/04/11 06:28:31.169] return self._read() if self._is_read else self._write()
[2024/04/11 06:28:31.169] pymongo/mongo_client.py:2480: in _read
[2024/04/11 06:28:31.169] return self._func(self._session, self._server, conn, read_pref) # type: ignore
[2024/04/11 06:28:31.169] pymongo/mongo_client.py:1417: in _cmd
[2024/04/11 06:28:31.169] self,
[2024/04/11 06:28:31.169] pymongo/helpers.py:327: in inner
[2024/04/11 06:28:31.169] return func(*args, **kwargs)
[2024/04/11 06:28:31.169] pymongo/server.py:190: in run_operation
[2024/04/11 06:28:31.169] _check_command_response(first, conn.max_wire_version)
[2024/04/11 06:28:31.169] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[2024/04/11 06:28:31.169] response = {'$clusterTime': {'clusterTime': Timestamp(1712842103, 9), 'signature': {'hash': b'\x00\x00\x00\x00\x00\x00\x00\x00\x0...rityNotEnabled', 'errmsg': 'Storage engine does not support read concern: { readConcern: { level: "majority" } }', ...}
[2024/04/11 06:28:31.169] max_wire_version = 7, allowable_errors = None, parse_write_concern_error = False
[2024/04/11 06:28:31.169] def _check_command_response(
[2024/04/11 06:28:31.169] response: _DocumentOut,
[2024/04/11 06:28:31.169] max_wire_version: Optional[int],
[2024/04/11 06:28:31.169] allowable_errors: Optional[Container[Union[int, str]]] = None,
[2024/04/11 06:28:31.169] parse_write_concern_error: bool = False,
[2024/04/11 06:28:31.169] ) -> None:
[2024/04/11 06:28:31.169] """Check the response to a command for errors."""
[2024/04/11 06:28:31.169] if "ok" not in response:
[2024/04/11 06:28:31.169] # Server didn't recognize our message as a command.
[2024/04/11 06:28:31.169] raise OperationFailure(
[2024/04/11 06:28:31.169] response.get("$err"), # type: ignore[arg-type]
[2024/04/11 06:28:31.169] response.get("code"),
[2024/04/11 06:28:31.169] response,
[2024/04/11 06:28:31.169] max_wire_version,
[2024/04/11 06:28:31.169] )
[2024/04/11 06:28:31.169]
[2024/04/11 06:28:31.169] if parse_write_concern_error and "writeConcernError" in response:
[2024/04/11 06:28:31.169] _error = response["writeConcernError"]
[2024/04/11 06:28:31.169] _labels = response.get("errorLabels")
[2024/04/11 06:28:31.169] if _labels:
[2024/04/11 06:28:31.169] _error.update({"errorLabels": _labels})
[2024/04/11 06:28:31.169] _raise_write_concern_error(_error)
[2024/04/11 06:28:31.169]
[2024/04/11 06:28:31.169] if response["ok"]:
[2024/04/11 06:28:31.169] return
[2024/04/11 06:28:31.169]
[2024/04/11 06:28:31.169] details = response
[2024/04/11 06:28:31.169] # Mongos returns the error details in a 'raw' object
[2024/04/11 06:28:31.169] # for some errors.
[2024/04/11 06:28:31.169] if "raw" in response:
[2024/04/11 06:28:31.169] for shard in response["raw"].values():
[2024/04/11 06:28:31.169] # Grab the first non-empty raw error from a shard.
[2024/04/11 06:28:31.169] if shard.get("errmsg") and not shard.get("ok"):
[2024/04/11 06:28:31.169] details = shard
[2024/04/11 06:28:31.169] break
[2024/04/11 06:28:31.169]
[2024/04/11 06:28:31.169] errmsg = details["errmsg"]
[2024/04/11 06:28:31.169] code = details.get("code")
[2024/04/11 06:28:31.169]
[2024/04/11 06:28:31.169] # For allowable errors, only check for error messages when the code is not
[2024/04/11 06:28:31.169] # included.
[2024/04/11 06:28:31.169] if allowable_errors:
[2024/04/11 06:28:31.169] if code is not None:
[2024/04/11 06:28:31.169] if code in allowable_errors:
[2024/04/11 06:28:31.169] return
[2024/04/11 06:28:31.169] elif errmsg in allowable_errors:
[2024/04/11 06:28:31.169] return
[2024/04/11 06:28:31.169]
[2024/04/11 06:28:31.169] # Server is "not primary" or "recovering"
[2024/04/11 06:28:31.169] if code is not None:
[2024/04/11 06:28:31.169] if code in _NOT_PRIMARY_CODES:
[2024/04/11 06:28:31.169] raise NotPrimaryError(errmsg, response)
[2024/04/11 06:28:31.169] elif HelloCompat.LEGACY_ERROR in errmsg or "node is recovering" in errmsg:
[2024/04/11 06:28:31.169] raise NotPrimaryError(errmsg, response)
[2024/04/11 06:28:31.169]
[2024/04/11 06:28:31.169] # Other errors
[2024/04/11 06:28:31.169] # findAndModify with upsert can raise duplicate key error
[2024/04/11 06:28:31.169] if code in (11000, 11001, 12582):
[2024/04/11 06:28:31.169] raise DuplicateKeyError(errmsg, code, response, max_wire_version)
[2024/04/11 06:28:31.169] elif code == 50:
[2024/04/11 06:28:31.169] raise ExecutionTimeout(errmsg, code, response, max_wire_version)
[2024/04/11 06:28:31.169] elif code == 43:
[2024/04/11 06:28:31.169] raise CursorNotFound(errmsg, code, response, max_wire_version)
[2024/04/11 06:28:31.169]
[2024/04/11 06:28:31.169] > raise OperationFailure(errmsg, code, response, max_wire_version)
[2024/04/11 06:28:31.169] E pymongo.errors.OperationFailure: Storage engine does not support read concern: { readConcern: { level: "majority" } }, full error: {'operationTime': Timestamp(1712842103, 9), 'ok': 0.0, 'errmsg': 'Storage engine does not support read concern: { readConcern: { level: "majority" } }', 'code': 148, 'codeName': 'ReadConcernMajorityNotEnabled', '$clusterTime': {'clusterTime': Timestamp(1712842103, 9), 'signature': {'hash': b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', 'keyId': 0}}}
[2024/04/11 06:28:31.169] pymongo/helpers.py:233: OperationFailure
- related to
-
PYTHON-2723 Convert transactions spec tests to unified test format
-
- Closed
-