|
This ticket will:
- Ensure we have proper js test coverage for the bug SERVER-23229, and
- Investigate which bug exactly was fixed by
SERVER-67416, and
- Investigate how to best backport that bug fix, both for the fix and to quiet multiversion fuzzer BFs, like BF-12390. The patch for
SERVER-67416 involved 60+ files so it may be worth creating a more targeted patch.
In more detail:
The work in SERVER-67416 seems to have fixed some bug assertions in `groupMissing.js` that were originally attributed to SERVER-23229. For example:
coll.drop();
|
coll.insert({a: null, b: 1});
|
coll.insert({b: 1});
|
coll.insert({a: null, b: 1});
|
|
res = coll.aggregate({$group: {_id: {a: "$a", b: "$b"}}});
|
assert(resultsEq(res.toArray(), [{_id: {b: 1}}, {_id: {a: null, b: 1}}]));
|
|
// Bug, see SERVER-23229.
|
coll.createIndex({a: 1, b: 1});
|
res = coll.aggregate({$sort: {a: 1, b: 1}}, {$group: {_id: {a: "$a", b: "$b"}}});
|
assert(resultsEq(res.toArray(), [{_id: {a: null, b: 1}}]));
|
|
// Correct behavior after SERVER-23229 is fixed.
|
if (0) {
|
coll.createIndex({a: 1, b: 1});
|
res = coll.aggregate({$sort: {a: 1, b: 1}}, {$group: {_id: {a: "$a", b: "$b"}}});
|
assert(resultsEq(res.toArray(), [{_id: {b: 1}}, {_id: {a: null, b: 1}}]));
|
}
|
After SERVER-67416, the correct behavior is observed. However, we know bug has nothing to do with SERVER-23229 because:
SERVER-67416 did not touch the well-known root cause of SERVER-23229.
- the queries above are never using PROJECTION_COVERED plans.
|