|
The ENSURE_SORTED stage is a PlanStage that drops results that are not in sorted order. I believe we only add this node when the server receives an OP_QUERY with an nToReturn specified on a sorted OR query.
The tests linked here all fail because SBE doesn't support ENSURE_SORTED. One possible solution would be to detect these types of plans earlier, and fall back to the classic engine if possible.
[js_test:merge_chunks_test] uncaught exception: Error: error: {
|
[js_test:merge_chunks_test] "$err" : "Encountered non-retryable error during query :: caused by :: Unsupported QSN in SBE stage builder: ENSURE_SORTED\n---pattern = { time: -1.0 }\n---nodeId = 6\n---fetched = 1\n---sortedByDiskLoc = 0\n---providedSorts = {baseSortPattern: {}, ignoredFields: []}\n---Child:\n------OR\n---------nodeId = 5\n---------fetched = 1\n---------sortedByDiskLoc = 0\n---------providedSorts = {baseSortPattern: {}, ignoredFields: []}\n---------Child 0:\n------------SORT\n---------------type = DEFAULT\n---------------pattern = { time: -1.0 }\n---------------limit = 5\n---------------nodeId = 2\n---------------fetched = 1\n---------------sortedByDiskLoc = 0\n---------------providedSorts = {baseSortPattern: {}, ignoredFields: []}\n---------------Child:\n------------------COLLSCAN\n---------------------ns = config.actionlog\n---------------------filter = what $eq \"balancer.round\"\n---------------------nodeId = 1\n---------------------fetched = 1\n---------------------sortedByDiskLoc = 0\n---------------------providedSorts = {baseSortPattern: {}, ignoredFields: []}\n\n---------Child 1:\n------------SORT\n---------------type = DEFAULT\n---------------pattern = { time: -1.0 }\n---------------limit = 0\n---------------nodeId = 4\n---------------fetched = 1\n---------------sortedByDiskLoc = 0\n---------------providedSorts = {baseSortPattern: {}, ignoredFields: []}\n---------------Child:\n------------------COLLSCAN\n---------------------ns = config.actionlog\n---------------------filter = what $eq \"balancer.round\"\n---------------------nodeId = 3\n---------------------fetched = 1\n---------------------sortedByDiskLoc = 0\n---------------------providedSorts = {baseSortPattern: {}, ignoredFields: []}\n\n",
|
[js_test:merge_chunks_test] "code" : 4822884
|
[js_test:merge_chunks_test] } :
|
List of tests failing in the sharding_op_query suite:
- jstests/sharding/merge_chunks_test.js (task)
- jstests/sharding/bulk_shard_insert.js (task)
|