test_index_filter fails on 5.0 dues to missing indexName response field
[2021/05/21 22:15:01.541] FAIL [0.031s]: test_index_filter (test_collection.TestCollection) [2021/05/21 22:15:01.541] ---------------------------------------------------------------------- [2021/05/21 22:15:01.541] Traceback (most recent call last): [2021/05/21 22:15:01.541] File "/data/mci/11ff8e9d6ed377cda2fa923dd1df1083/src/test/__init__.py", line 509, in wrap [2021/05/21 22:15:01.541] return f(*args, **kwargs) [2021/05/21 22:15:01.541] File "/data/mci/11ff8e9d6ed377cda2fa923dd1df1083/src/test/test_collection.py", line 611, in test_index_filter [2021/05/21 22:15:01.541] self.assertEqual("x_1", stage.get('indexName')) [2021/05/21 22:15:01.541] AssertionError: 'x_1' != None
Server version:
[2021/05/21 22:08:12.621] db version v5.0.0-alpha0-566-g9fd5b3a [2021/05/21 22:08:12.621] Build Info: { [2021/05/21 22:08:12.621] "version": "5.0.0-alpha0-566-g9fd5b3a", [2021/05/21 22:08:12.621] "gitVersion": "9fd5b3adca829fe003e58c5d9ba5e56f1ae18059", [2021/05/21 22:08:12.621] "openSSLVersion": "OpenSSL 1.0.2k-fips 26 Jan 2017", [2021/05/21 22:08:12.621] "modules": [ [2021/05/21 22:08:12.621] "enterprise" [2021/05/21 22:08:12.621] ], [2021/05/21 22:08:12.621] "allocator": "tcmalloc", [2021/05/21 22:08:12.621] "environment": { [2021/05/21 22:08:12.621] "distmod": "amzn64", [2021/05/21 22:08:12.621] "distarch": "x86_64", [2021/05/21 22:08:12.621] "target_arch": "x86_64" [2021/05/21 22:08:12.621] } [2021/05/21 22:08:12.621] }
Here's the test with more context:
self.assertEqual("x_1", db.test.create_index( [('x', ASCENDING)], partialFilterExpression={"a": {"$lte": 1.5}})) db.test.insert_one({"x": 5, "a": 2}) db.test.insert_one({"x": 6, "a": 1}) # Operations that use the partial index. explain = db.test.find({"x": 6, "a": 1}).explain() stage = self.get_plan_stage(explain['queryPlanner']['winningPlan'], 'IXSCAN') self.assertEqual("x_1", stage.get('indexName'))
It looks like like either the server's explain output has changed or the query planner itself has changed.
- is caused by
-
SERVER-53270 Include SBE PlanStage tree string into explain output
- Closed