| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
|
|
|
| |
This stage is distinguished from the Mock stage in that it doesn't
bother tracking state about which methods have been called. The queue
version is simpler and is used in production code (namely the update
system), whereas the mock is still preferred in testing environments.
|
| |
|
|
|
|
| |
This commit also renames DocumentSourceMock::create to DocumentSourceMock::createForTest.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Rename utils/mongoutils/str.h => utils/str.h
Rename namespace mongoutils::str => str
Rename mongo::strcasecmp => str::caseInsensitiveCompare.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Remove leading comments that are just stating the filename.
Move any file-level comments below the copyright banner.
Remove leading blank lines.
|
| |
|
| |
|
| |
|
|
|
|
| |
This reverts commit b83813667df5d783e7f34bea069d8d586946e563.
|
| |
|
| |
|
|
|
|
| |
were modified by an update
|
| |
|
|
|
|
| |
validation to fail
|
| |
|
| |
|
|
|
|
| |
returning error Status
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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).
|
| |
|
| |
|
|
|
|
|
|
| |
These headers date from before C++11 support and the `::mongo::stdx::`
namespace. They can be removed and uses of the names therein can
be changed to `::mongo::stdx::unordered_`* forms.
|
| |
|
|
|
|
|
|
|
|
| |
We left the deleted update system in 3.6 to support upgrades from 3.4,
but newer versions will always use the new UpdateNode update system.
Fun fact: this commit deletes more lines than were inserted by the
previous 100 commits.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before this change, a {$rename: {from: "to"}} would check to see if
the "from" and "to" values were identical, allowing it to elide the
{$set: {to: <value-of-from-field>}} portion of the oplog update
entry. The equality check we used was not exact, however, resulting in
potentially incorrect results from $rename in edge cases.
We could use a precise equality check, but it's more expensive. More
likely than not, it's cheaper to just include the $set in the oplog
update for every $rename, so that's what we do now.
|
|
|
|
| |
new null index keys
|
|
|
|
| |
performance
|
|
|
|
| |
operator[](StringData name) for arrays
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With the new UpdateNodes class hierarchy, there are two code paths for
applying an update to a document that have slightly different
semantics. The order of fields in the resulting document can vary
depending on which code path is used to apply an update. A difference
in ordering between documents in a replica set is considered a
"mismatch," so we need to ensure that secondaries always apply updates
using the same update system that the primary uses.
When an update executes as part of the application of an oplog entry,
the update is now allowed to have a $v field, which allows it to
specify which semantics were used by the operation that we are
replicating by applying the entry. When the primary uses the new
semantics (because it is a 3.6 mongod with featureCompatibilityVersion
set to 3.6), it includes {$v: 1} in the oplog's update document to
indicate that the secondary should apply with the newer 'UpdateNode'
semantics.
There are two other places where we need this behavior:
1) In role_graph_update.cpp, where the handleOplogUpdate observer
needs to update its in-memory BSON representation of a role to
reflect an update in the admin database and
2) in the applyOps command, which is used for testing how oplog
entries get applied.
Both these code paths set the fromOplogApplication flag, which
replaces the old fromReplication flag, and they also gain behavior
that used to be exclusive to oplog applications from
replication. (Specifically, they skip update validation checks, which
should have already passed before the oplog entry was created.)
|
|
|
|
|
| |
This adds back a check that got lost in the translation from
modifier_inc to ArithmeticNode.
|
| |
|
|
|
|
| |
ComparisonMatchExpression
|