-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
These mapReduce doc tests are failing on MongoDB 4.3:
Document: examples/aggregation ------------------------------ ********************************************************************** File "examples/aggregation.rst", line 121, in default Failed example: for doc in result.find(): pprint.pprint(doc) Expected: {'_id': 'cat', 'value': 3.0} {'_id': 'dog', 'value': 2.0} {'_id': 'mouse', 'value': 1.0} Got: {'_id': 'cat', 'value': 3.0} {'_id': 'mouse', 'value': 1.0} {'_id': 'dog', 'value': 2.0} ********************************************************************** File "examples/aggregation.rst", line 139, in default Failed example: pprint.pprint( db.things.map_reduce(mapper, reducer, "myresults", full_response=True)) Expected: {...'counts': {'emit': 6, 'input': 4, 'output': 3, 'reduce': 2}, 'ok': ..., 'result': '...', 'timeMillis': ...} Got: {'$clusterTime': {'clusterTime': Timestamp(1581123789, 1669), 'signature': {'hash': '\x00\x00\x00\x00\x00\x00\x00\x00' '\x00\x00\x00\x00\x00\x00\x00\x00' '\x00\x00\x00\x00', 'keyId': 0}}, 'ok': 1.0, 'operationTime': Timestamp(1581123789, 1669), 'result': 'myresults'} ********************************************************************** File "examples/aggregation.rst", line 154, in default Failed example: for doc in results.find(): pprint.pprint(doc) Expected: {'_id': 'cat', 'value': 1.0} {'_id': 'dog', 'value': 1.0} Got: {'_id': 'dog', 'value': 1.0} {'_id': 'cat', 'value': 1.0} ********************************************************************** File "examples/aggregation.rst", line 166, in default Failed example: pprint.pprint( db.things.map_reduce( mapper, reducer, out=SON([("replace", "results"), ("db", "outdb")]), full_response=True)) Expected: {...'counts': {'emit': 6, 'input': 4, 'output': 3, 'reduce': 2}, 'ok': ..., 'result': {'collection': ..., 'db': ...}, 'timeMillis': ...} Got: {'$clusterTime': {'clusterTime': Timestamp(1581123789, 1678), 'signature': {'hash': '\x00\x00\x00\x00\x00\x00\x00\x00' '\x00\x00\x00\x00\x00\x00\x00\x00' '\x00\x00\x00\x00', 'keyId': 0}}, 'ok': 1.0, 'operationTime': Timestamp(1581123789, 1678), 'result': {'collection': 'results', 'db': 'outdb'}} ********************************************************************** 1 items had failures:
The interesting thing here is that it appears the order of mapReduce's resulting collection is no longer stable.
- related to
-
PYTHON-2072 MR in Agg: Remove in-line mapReduce execution statistics
- Closed