-
Type:
Investigation
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Tools and Replicator
-
1
Original Downstream Change Summary
This is a follow-on to SERVER-36681. It fixes a bug in the original bug fix.
Basically, we do not traverse into nested arrays, so checking for $eq of "a.b" in {a: [[
]]} will not match. The bug was that this was true in SBE but not classic. Now the behavior is the same in both. Alerting the same set of downstream people as for the original ticket. Possibly no additional changes are needed for most.
Description of Linked Ticket
Results don't match in the default knob configuration
legacyNull=false forceClassicEngine => count: 2 legacyNull=false trySbeRestricted => count: 3 legacyNull=true forceClassicEngine => count: 2 legacyNull=true trySbeRestricted => count: 2
const docs = [{}, {b: [[], {a: 0}]}, {}]; const pipeline = [{$match: {"b.a": {$gte: null}}}, {$group: {_id: null, n: {$sum: 1}}}]; function count(coll) { const res = coll.aggregate(pipeline).toArray(); return res.length ? res[0].n : 0; } for (const knob of [false, true]) { db.adminCommand({setParameter: 1, internalQueryLegacyDottedPathNullSemantics: knob}); for (const eng of ["forceClassicEngine", "trySbeRestricted"]) { db.adminCommand({setParameter: 1, internalQueryFrameworkControl: eng}); db.c.drop(); docs.forEach((d) => db.c.insertOne(d)); print("legacyNull=" + knob, eng, "=> count:", count(db.c)); } }
I assume we want results to match here, but I don't have a ton of context.
- depends on
-
SERVER-133164 trySbeRestricted results do not match classic internalQueryLegacyDottedPathNullSemantics
-
- Closed
-