| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
This reverts commit 5b50a111c9361554bc7dbe6a8c63c885a5c29df6.
|
| |
|
|
|
|
| |
This reverts commit 1315b6fdd3ade546c37364bcd4b0ba224adb7f58.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Segregate old-style dbtests into their own Suite initialization
system: OldStyleSuiteSpecification. This is where the funky
deprecated features can live on without interfering with the
Suite API. It also gives us a searchable base class to identify
them in the future.
OldStyleSuite has `setupTests()` and an `add<T>()` that
Suite does not have. Suite API can shrink when it doesn't
have to support these dbtest adaptor features.
Suite only needs non-template `add(name, callback)`.
- Add OldStyleSuiteInitializer to some dbtests that were missing it!
These didn't use SuiteInstance to register themselves and were
incorrect. They would self register, resulting in _allSuites()
holding a std::shared_ptr to a static-duration Suite object!
- Change `getSuite()` to return `Suite&` instead of `Suite*`.
- No more "self-registering" in Suite constructor. Registration
must be done as a separate post-construction step. This removes
some unusual lifetime management code and is easier to document.
Suite::getSuite(name) is the only way to make a Suite, and it
does the make_shared and registration calls with a pseudo-private
ConstructorEnable idiom.
- Suite->run() returns std::unique_ptr<Result> instead of
raw `Result*`. It's virtual to support OldStyleSuite behavior.
- Suite._ran does nothing. Removed.
- Result.cur does nothing. Removed.
- Switch to pass-by-value and std::move for most ctor args.
- Add explicit on 1-arg ctors.
- Get rid of TestHolder. It's just a 2-field struct.
- use fmt instead of snprintf
- TEST and TEST_F macros: generate TEST_TYPE once.
- TEST and TEST_F macros: inline the _agent variable.
- Mark _doRun as `override`.
- Terminology: replace CASE_NAME with SUITE_NAME.
- rename DeathTestImpl -> DeathTestBase
- move getDeathTestPattern into the test as a static member function
- refactor out some repetition from the comparator decl macros
- use if-constexpr and diamond relops to clean up the
ComparisonAssertion class.
- dbtests: conditionally skip some add<T> calls
- further dedup (DEATH_)TEST(_F) macros
|
|
|
|
|
|
| |
Document/Value is now used throughout the query execution
engine, and therefore should move into the directory which
holds query execution code.
|
| |
|
| |
|
| |
|
|
|
|
| |
confusion with $merge
|
|
|
|
| |
This commit also renames DocumentSourceMock::create to DocumentSourceMock::createForTest.
|
| |
|
|
|
|
| |
This reverts commit e549f39cd70a51054a48aa8765558db6b03b1df3.
|
| |
|
|
|
|
|
|
| |
The streaming $group optimization was never fully implemented,
so the code was disabled. This patch removes the dead code, including
DocumentSource::getOutputSorts().
|
|
|
|
|
|
| |
Remove leading comments that are just stating the filename.
Move any file-level comments below the copyright banner.
Remove leading blank lines.
|
|
|
|
|
| |
Allows an $out stage to run in parallel on all shards if the target
collection is sharded and so is the input collection to the aggregate.
|
|
|
|
| |
This reverts commit 0cb2195939494660334db8e9d0a52509caeb621c.
|
| |
|
|
|
|
| |
file per spill to disk
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This commit makes it so that aggregations will always use a
$mergeCursors as a wrapper around a AsyncResultsMerger, which is new
behavior for mongos. As part of this refactor, we can delete the concept
of a 'merging presorted' $sort stage (which is now handled by the
AsyncResultsMerger) and delete the DocumentSourceRouterAdapter stage
which talked to a RouterStageMerge, instead directly using a
$mergeCursors stage.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
every unit test.
This patch does several loosely related and surprisingly hard to separate things.
1.) Make the ServiceContext class final
2.) Create a mechanism, called ConstructorActions, for running methods on
ServiceContexts immediately after they're built and immediately before they're
destroyed.
3.) Introduce / improve test fixture base classes for tests, giving them fresh
ServiceContext instances for each test case. There is one fixture for tests that
need a storage engine and another for those that do not.
4.) Make several remaining global variables SC decorations in support of (3)
5.) Replace many MONGO_INITIALIZERS that access getGlobalServiceContext with the
new constructor-actions system, which is needed for (3.)
6.) Fix up tests to use the fixtures from (3) and fix tests that silently used
different service contexts in together in a technically illegal fashion that now
breaks.
7.) Utilize (2) as necessary to simplify initialization of new ServiceContexts,
simplifying the fixtures in (3).
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This commit removes the geoNear command and moves its implementation
into the aggregation framework. Users should use the aggregate command
with a $geoNear stage.
The implementation rewrite additionally removes the limit in the
$geoNear aggregation stage. To limit the number of results, use a $limit
stage.
|
|
|
|
|
|
| |
Closes #1237
Signed-off-by: Charlie Swanson <charlie.swanson@mongodb.com>
|
| |
|
|
|
|
| |
allowDiskUse is false
|
| |
|
|
|
|
| |
All users were converted to just use AssertionException.
|
| |
|
|
|
|
|
|
|
|
|
| |
Merges the three parallel vectors in DocumentSourceGroup and
DocumentSourceBucketAuto into one vector of AccumulationStatements.
Closes #1143
Signed-off-by: Charlie Swanson <charlie.swanson@mongodb.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These methods were formally used to propagate a new ExpressionContext to
stages, accumulators, or expressions which potentially needed to
comparisons. Originally, this was necessary since Pipeline parsing
happened outside of the collection lock and thus could not determine if
there was a default collation on the collection. This meant that the
collation could change after parsing and any operators that might
compare strings would need to know about it.
We have since moved parsing within the lock, so the collation can be
known at parse time and the ExpressionContext should not change. This
patch requires an ExpressionContext at construction time, and disallows
changing the collation on an ExpressionContext.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
This is prep work for adding tests that all stages can correctly handle
a kPauseExecution result.
|
|
|