-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Query Execution
-
None
-
Fully Compatible
-
ALL
-
Query Execution 2021-05-03
This was caught by the aggregation_multiversion_fuzzer, but I distilled it into a simple handwritten repro:
// Minimized repro inspired by this failing aggregation_multiversion_fuzzer task: // // https://spruce.mongodb.com/task/mongodb_mongo_master_enterprise_rhel_80_64_bit_dynamic_required_aggregation_multiversion_fuzzer_2_enterprise_rhel_80_64_bit_dynamic_required_patch_4fb8fa99ad6bda23030204ef29fb8cbfffc19082_6073178fa4cf4727fc7e2cd5_21_04_11_15_37_25/tests?execution=0&sortBy=STATUS&sortDir=ASC (function() { function createCollectionAndRunProblemQuery(conn) { const testDb = conn.getDB("testdb"); const coll = testDb.test_collection; coll.drop(); assert.commandWorked(coll.insert({num: NumberDecimal("220.25942974306372")})); return coll.findOne({num: {$bitsAnyClear: 10000110}}); }; let conn = MongoRunner.runMongod(); assert.neq(null, conn, "failed to start"); const withoutSbe = createCollectionAndRunProblemQuery(conn); MongoRunner.stopMongod(conn); conn = MongoRunner.runMongod({setParameter: "featureFlagSBE=true"}); const withSbe = createCollectionAndRunProblemQuery(conn); MongoRunner.stopMongod(conn); assert.eq(withoutSbe, withSbe); }());
Running this repro shows that for the example $bitsAnyClear match expression, the document matches when SBE is off but fails to match when SBE is on. The bitwise operations predate the introduction of NumberDecimal, so it's quite possible that the behavior prior to SBE was incidental – why would you do bitwise operations against a NumberDecimal anyway?
Looking at the code quite quickly, my guess is that SBE is bailing out here:
- depends on
-
SERVER-56326 Add a round() method to the Decimal128 class
- Closed
- is depended on by
-
SERVER-56119 Enable generational agg and query fuzzer suites for "Classic Execution Engine" build variant
- Closed
- is duplicated by
-
SERVER-56084 [SBE] aggregation_multiversion_fuzzer fails with SBE on due to different results from $graphLookup
- Closed