-
Type:
Task
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Execution
-
Fully Compatible
-
QE 2026-10-26
-
0
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Filter out false-positive logs in engine_selection_deferred_executor.js
The test expects to see 1 log message from the most recent query with the engine selection info, but the same log can appear from background threads (in this case monitoring-keys-for-HMAC), causing a failure.
expected log:
[js_test:engine_selection_deferred_executor] d21122| {"t":{"$date":"2026-10-29T13:38:58.709+00:00"},"s":"D1", "c":"QUERY", "id":11986305,"ctx":"conn1","msg":"Plan-based engine selection logic invoked.","attr":{"solution":"EQ_LOOKUP_UNWIND\n---from = engine_selection.foreignColl\n---as = res\n---localField = a\n---foreignField = a\n---lookupStrategy = HashJoin\n---shouldProduceBson = 1\n---preserveNullAndEmptyArrays = 0\n---nodeId = 3\n---fetched = 1\n---sortedByDiskLoc = 0\n---providedSorts = {baseSortPattern: {}, ignoredFields: []}\n---Outer:\n------COLLSCAN\n---------ns = engine_selection.localColl\n---------filter = $and\n---------nodeId = 1\n---------fetched = 1\n---------sortedByDiskLoc = 0\n---------providedSorts = {baseSortPattern: {}, ignoredFields: []}\n---Inner:\n------COLLSCAN\n---------ns = engine_selection.foreignColl\n---------nodeId = 2\n---------fetched = 1\n---------sortedByDiskLoc = 0\n---------providedSorts = {baseSortPattern: {}, ignoredFields: []}\n"}}
false positive:
[js_test:engine_selection_deferred_executor] d21122| {"t":{"$date":"2026-10-29T13:38:58.585+00:00"},"s":"D1", "c":"QUERY", "id":11986305,"ctx":"monitoring-keys-for-HMAC","msg":"Plan-based engine selection logic invoked.","attr":{"solution":"SORT\n---type = SIMPLE\n---pattern = { expiresAt: 1 }\n---limit = 0\n---nodeId = 2\n---fetched = 1\n---sortedByDiskLoc = 0\n---providedSorts = {baseSortPattern: {}, ignoredFields: []}\n---Child:\n------COLLSCAN\n---------ns = admin.system.keys\n---------filter = $and\n purpose $eq \"HMAC\"\n expiresAt $gt Timestamp(0, 0)\n---------nodeId = 1\n---------fetched = 1\n---------sortedByDiskLoc = 0\n---------providedSorts = {baseSortPattern: {}, ignoredFields: []}\n"}}
Narrow down the log search filter to find only the relevant query.