Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-72268

Assertion in CETester::getCE when running CE benchmark

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.3.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Query Optimization
    • Fully Compatible
    • ALL
    • Hide

      In src/mongo/db/query/ce/benchmark_test.cpp look for the benchmarked called BucketLargeNumber10HistogramsLargeConjunctions.

      Modify it by reducing the number of fields to generate histograms for like so:

         runBenchmarks(
              {_testInfo.testName(),
               1,
               kLargeBucketCounts,
               {{"a", BucketValueType::Int},
                {"b", BucketValueType::Int},
                {"c", BucketValueType::Int},
                {"d", BucketValueType::Int}},
               {
                   {"a_1", makeIndexDefinition("a", CollationOp::Ascending, false /*isMultiKey*/)},
                   {"b_1", makeIndexDefinition("b", CollationOp::Ascending, false /*isMultiKey*/)},
                   {"c_1", makeIndexDefinition("c", CollationOp::Ascending, false /*isMultiKey*/)},
                   {"d_1", makeIndexDefinition("d", CollationOp::Ascending, true /*isMultiKey*/)},
                   {"e_1", makeIndexDefinition("e", CollationOp::Ascending, false /*isMultiKey*/)},
                   {"f_1", makeIndexDefinition("f", CollationOp::Ascending, false /*isMultiKey*/)},
                   {"g_1", makeIndexDefinition("g", CollationOp::Ascending, false /*isMultiKey*/)},
                   {"h_1", makeIndexDefinition("h", CollationOp::Ascending, false /*isMultiKey*/)},
                   {"i_1", makeIndexDefinition("i", CollationOp::Ascending, false /*isMultiKey*/)},
                   {"j_1", makeIndexDefinition("j", CollationOp::Ascending, false /*isMultiKey*/)},
               },
               10 /*numPredicates*/},
              "{a: {$gt: 1}, b: {$gt: 10}, c: {$gt: 0}, d: {$elemMatch: {$gt: 10, $lt: 100}}, e: {$lte: "
              "80}, f: {$gte: 500}, g: {$eq: 79}, h: {$lt: 11}, i: {gt: 120}, j: {$eq: 44} }");
      }
      

      Compile and run the benchmark:

      ./build/install/bin/ce_benchmark_test --filter BucketLargeNumber10HistogramsLargeConjunctions
      Show
      In src/mongo/db/query/ce/benchmark_test.cpp look for the benchmarked called BucketLargeNumber10HistogramsLargeConjunctions. Modify it by reducing the number of fields to generate histograms for like so: runBenchmarks( {_testInfo.testName(), 1, kLargeBucketCounts, {{ "a" , BucketValueType::Int}, { "b" , BucketValueType::Int}, { "c" , BucketValueType::Int}, { "d" , BucketValueType::Int}}, { { "a_1" , makeIndexDefinition( "a" , CollationOp::Ascending, false /*isMultiKey*/ )}, { "b_1" , makeIndexDefinition( "b" , CollationOp::Ascending, false /*isMultiKey*/ )}, { "c_1" , makeIndexDefinition( "c" , CollationOp::Ascending, false /*isMultiKey*/ )}, { "d_1" , makeIndexDefinition( "d" , CollationOp::Ascending, true /*isMultiKey*/ )}, { "e_1" , makeIndexDefinition( "e" , CollationOp::Ascending, false /*isMultiKey*/ )}, { "f_1" , makeIndexDefinition( "f" , CollationOp::Ascending, false /*isMultiKey*/ )}, { "g_1" , makeIndexDefinition( "g" , CollationOp::Ascending, false /*isMultiKey*/ )}, { "h_1" , makeIndexDefinition( "h" , CollationOp::Ascending, false /*isMultiKey*/ )}, { "i_1" , makeIndexDefinition( "i" , CollationOp::Ascending, false /*isMultiKey*/ )}, { "j_1" , makeIndexDefinition( "j" , CollationOp::Ascending, false /*isMultiKey*/ )}, }, 10 /*numPredicates*/ }, "{a: {$gt: 1}, b: {$gt: 10}, c: {$gt: 0}, d: {$elemMatch: {$gt: 10, $lt: 100}}, e: {$lte: " "80}, f: {$gte: 500}, g: {$eq: 79}, h: {$lt: 11}, i: {gt: 120}, j: {$eq: 44} }" ); } Compile and run the benchmark: ./build/install/bin/ce_benchmark_test --filter BucketLargeNumber10HistogramsLargeConjunctions
    • QO 2023-01-09, QO 2023-01-23

      Expected std::abs((card) - (memoCE)) <= kMaxCEError (1.32146 <= 0.01) @src/mongo/db/query/ce/test_utils.cpp:132

            Assignee:
            alya.berciu@mongodb.com Alya Berciu
            Reporter:
            anton.korshunov@mongodb.com Anton Korshunov
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: