diff options
11 files changed, 29 insertions, 23 deletions
diff --git a/buildscripts/errorcodes.py b/buildscripts/errorcodes.py index 8d9330b4240..bcabaa2e9cc 100755 --- a/buildscripts/errorcodes.py +++ b/buildscripts/errorcodes.py @@ -46,6 +46,7 @@ _CODE_PATTERNS = [ r"(?:StatusOK)?" r"(?:WithContext)?" r"\s*\(", + r"MONGO_UNREACHABLE_TASSERT\(", # DBException and AssertionException constructors r"(?:DB|Assertion)Exception\s*[({]", # Calls to all LOGV2* variants diff --git a/buildscripts/tests/data/errorcodes/regex_matching/regex_matching.cpp b/buildscripts/tests/data/errorcodes/regex_matching/regex_matching.cpp index 834d2052a98..24b0b42fed3 100644 --- a/buildscripts/tests/data/errorcodes/regex_matching/regex_matching.cpp +++ b/buildscripts/tests/data/errorcodes/regex_matching/regex_matching.cpp @@ -27,4 +27,9 @@ LOGV2_ERROR(25, "more words"); LOGV2_ERROR(26, "words", - "comma, more words words words words words words words words words words words words " + "comma, more words words words words words words words words words words words words "); +iassert(27, "words"); +iasserted(28, "words"); +iassertNoTrace(29, "words"); +iassertedNoTrace(30, "words"); +MONGO_UNREACHABLE_TASSERT(31); diff --git a/buildscripts/tests/test_errorcodes.py b/buildscripts/tests/test_errorcodes.py index 2a9c9ce1e3f..17c102454b5 100644 --- a/buildscripts/tests/test_errorcodes.py +++ b/buildscripts/tests/test_errorcodes.py @@ -26,7 +26,7 @@ class TestErrorcodes(unittest.TestCase): captured_error_codes.append(code) errorcodes.parse_source_files(accumulate_files, TESTDATA_DIR + 'regex_matching/') - self.assertEqual(26, len(captured_error_codes)) + self.assertEqual(31, len(captured_error_codes)) def test_dup_checking(self): """Test dup checking.""" diff --git a/jstests/aggregation/sources/multiple_unpack_bucket_error.js b/jstests/aggregation/sources/multiple_unpack_bucket_error.js index 5c835b5e16e..3b5f20bf631 100644 --- a/jstests/aggregation/sources/multiple_unpack_bucket_error.js +++ b/jstests/aggregation/sources/multiple_unpack_bucket_error.js @@ -18,7 +18,7 @@ assert.commandFailedWithCode(db.runCommand({ ], cursor: {} }), - 5348302); + 5348304); // $_unpackBucket is an alias of $_internalUnpackBucket, the same restriction should apply. assert.commandFailedWithCode(db.runCommand({ @@ -29,7 +29,7 @@ assert.commandFailedWithCode(db.runCommand({ ], cursor: {} }), - 5348302); + 5348304); assert.commandFailedWithCode(db.runCommand({ aggregate: coll.getName(), pipeline: [ @@ -38,11 +38,11 @@ assert.commandFailedWithCode(db.runCommand({ ], cursor: {} }), - 5348302); + 5348304); assert.commandFailedWithCode(db.runCommand({ aggregate: coll.getName(), pipeline: [{$_unpackBucket: {timeField: 'time'}}, {$_unpackBucket: {timeField: 'time'}}], cursor: {} }), - 5348302); + 5348304); })(); diff --git a/jstests/aggregation/sources/setWindowFields/derivative.js b/jstests/aggregation/sources/setWindowFields/derivative.js index b457a1fa097..a57af814b30 100644 --- a/jstests/aggregation/sources/setWindowFields/derivative.js +++ b/jstests/aggregation/sources/setWindowFields/derivative.js @@ -192,9 +192,9 @@ function explainUnit(unit) { return coll.runCommand( {explain: {aggregate: coll.getName(), cursor: {}, pipeline: [derivativeStage(unit)]}}); } -assert.commandFailedWithCode(explainUnit('year'), 5490704); -assert.commandFailedWithCode(explainUnit('quarter'), 5490704); -assert.commandFailedWithCode(explainUnit('month'), 5490704); +assert.commandFailedWithCode(explainUnit('year'), 5490710); +assert.commandFailedWithCode(explainUnit('quarter'), 5490710); +assert.commandFailedWithCode(explainUnit('month'), 5490710); assert.commandWorked(explainUnit('week')); assert.commandWorked(explainUnit('day')); assert.commandWorked(explainUnit('hour')); diff --git a/jstests/aggregation/sources/setWindowFields/integral.js b/jstests/aggregation/sources/setWindowFields/integral.js index a62033e2b4f..bb0e962c504 100644 --- a/jstests/aggregation/sources/setWindowFields/integral.js +++ b/jstests/aggregation/sources/setWindowFields/integral.js @@ -115,9 +115,9 @@ function explainUnit(unit) { } }); } -assert.commandFailedWithCode(explainUnit('year'), 5490704); -assert.commandFailedWithCode(explainUnit('quarter'), 5490704); -assert.commandFailedWithCode(explainUnit('month'), 5490704); +assert.commandFailedWithCode(explainUnit('year'), 5490710); +assert.commandFailedWithCode(explainUnit('quarter'), 5490710); +assert.commandFailedWithCode(explainUnit('month'), 5490710); assert.commandWorked(explainUnit('week')); assert.commandWorked(explainUnit('day')); assert.commandWorked(explainUnit('hour')); diff --git a/src/mongo/db/pipeline/document_source.h b/src/mongo/db/pipeline/document_source.h index ee3977aed18..f527cb1ef64 100644 --- a/src/mongo/db/pipeline/document_source.h +++ b/src/mongo/db/pipeline/document_source.h @@ -649,7 +649,7 @@ public: return true; } // Cannot hit. - MONGO_UNREACHABLE_TASSERT(6434901); + MONGO_UNREACHABLE_TASSERT(6434902); } Type type; diff --git a/src/mongo/db/pipeline/lite_parsed_pipeline.cpp b/src/mongo/db/pipeline/lite_parsed_pipeline.cpp index 36b1d78d9b7..b7ca9c6310e 100644 --- a/src/mongo/db/pipeline/lite_parsed_pipeline.cpp +++ b/src/mongo/db/pipeline/lite_parsed_pipeline.cpp @@ -193,7 +193,7 @@ void LiteParsedPipeline::validate(const OperationContext* opCtx, // Validates that the pipeline contains at most one $_internalUnpackBucket or $_unpackBucket // stage. - uassert(5348302, + uassert(5348304, str::stream() << "Encountered pipeline with more than one " << DocumentSourceInternalUnpackBucket::kStageNameInternal << " or " << DocumentSourceInternalUnpackBucket::kStageNameExternal << " stage", diff --git a/src/mongo/db/pipeline/window_function/window_function_expression.h b/src/mongo/db/pipeline/window_function/window_function_expression.h index 0d638ac1350..261d4212fe5 100644 --- a/src/mongo/db/pipeline/window_function/window_function_expression.h +++ b/src/mongo/db/pipeline/window_function/window_function_expression.h @@ -555,7 +555,7 @@ protected: case TimeUnit::year: case TimeUnit::quarter: case TimeUnit::month: - uasserted(5490704, "unit must be 'week' or smaller"); + uasserted(5490710, "unit must be 'week' or smaller"); // Only these time units are allowed. case TimeUnit::week: case TimeUnit::day: @@ -803,11 +803,11 @@ public: } boost::intrusive_ptr<AccumulatorState> buildAccumulatorOnly() const final { - MONGO_UNREACHABLE_TASSERT(5490701); + MONGO_UNREACHABLE_TASSERT(5490704); } std::unique_ptr<WindowFunctionState> buildRemovable() const final { - MONGO_UNREACHABLE_TASSERT(5490702); + MONGO_UNREACHABLE_TASSERT(5490705); } Value serialize(boost::optional<ExplainOptions::Verbosity> explain) const final { @@ -851,11 +851,11 @@ public: } boost::intrusive_ptr<AccumulatorState> buildAccumulatorOnly() const final { - MONGO_UNREACHABLE_TASSERT(5490701); + MONGO_UNREACHABLE_TASSERT(5490706); } std::unique_ptr<WindowFunctionState> buildRemovable() const final { - MONGO_UNREACHABLE_TASSERT(5490702); + MONGO_UNREACHABLE_TASSERT(5490707); } }; @@ -873,11 +873,11 @@ public: } boost::intrusive_ptr<AccumulatorState> buildAccumulatorOnly() const final { - MONGO_UNREACHABLE_TASSERT(5490701); + MONGO_UNREACHABLE_TASSERT(5490708); } std::unique_ptr<WindowFunctionState> buildRemovable() const final { - MONGO_UNREACHABLE_TASSERT(5490702); + MONGO_UNREACHABLE_TASSERT(5490709); } }; diff --git a/src/mongo/db/query/datetime/date_time_support.cpp b/src/mongo/db/query/datetime/date_time_support.cpp index 1fe0ecd81d0..93859935c98 100644 --- a/src/mongo/db/query/datetime/date_time_support.cpp +++ b/src/mongo/db/query/datetime/date_time_support.cpp @@ -842,7 +842,7 @@ StringData serializeTimeUnit(TimeUnit unit) { case TimeUnit::millisecond: return "millisecond"_sd; } - MONGO_UNREACHABLE_TASSERT(5339900); + MONGO_UNREACHABLE_TASSERT(5339903); } DayOfWeek parseDayOfWeek(StringData dayOfWeek) { diff --git a/src/mongo/s/commands/cluster_map_reduce_agg.cpp b/src/mongo/s/commands/cluster_map_reduce_agg.cpp index 3591aa20b17..746ba39c7bc 100644 --- a/src/mongo/s/commands/cluster_map_reduce_agg.cpp +++ b/src/mongo/s/commands/cluster_map_reduce_agg.cpp @@ -239,7 +239,7 @@ bool runAggregationMapReduce(OperationContext* opCtx, case cluster_aggregation_planner::AggregationTargeter::TargetingPolicy:: kSpecificShardOnly: { // It should not be possible to pass $_passthroughToShard to a map reduce command. - MONGO_UNREACHABLE_TASSERT(6273803); + MONGO_UNREACHABLE_TASSERT(6273805); } } } catch (DBException& e) { |