| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
| |
This reverts commit ad9267a722e21268d1005c1428ccad85d5a98946 (SERVER-41614).
|
|
|
|
|
|
|
|
|
|
| |
Add support for a mode for the task executor where rather than
targetting a single host, we target any of a set of hosts. This should
behave identically to scheduleRemoteCommand, except that we concurrently
get() connections from the connection pool for each host, preferring the
first which is available
(cherry picked from commit efa1ae064b9206f82136a8d14cbb86d47e8754b1)
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Hostnames passed to replSetInitiate, replSetReconfig, addShard, etc. are
all normalized by replacing ASCII uppercase characters with lowercase
characters, consistent with how MongoDB drivers treat hostnames.
The shell's getHostName() function now returns the hostname lowercased.
Fixes undefined behavior in mongo::str::toLower().
|
|
|
|
|
|
| |
visible inclusion.
A few forward-decl headers were created also.
|
| |
|
| |
|
| |
|
|
|
|
| |
This reverts commit 5e346eb4b9bb3ec678d4eac36b3f0a18c1c10939.
|
|
|
|
|
|
|
|
| |
Hostnames passed to replSetInitiate, replSetReconfig, addShard, etc. are
all normalized by replacing ASCII uppercase characters with lowercase
characters, consistent with how MongoDB drivers treat hostnames.
Fixes undefined behavior in mongo::str::toLower().
|
|
|
|
|
|
| |
Rename utils/mongoutils/str.h => utils/str.h
Rename namespace mongoutils::str => str
Rename mongo::strcasecmp => str::caseInsensitiveCompare.
|
|
|
|
|
|
| |
This prevents the background threads being started in the Windows thread
pool after we return from main() while we're tearing down the CRT causing
access violations even though we returned 0 from main.
|
|
|
|
|
|
|
|
|
|
|
| |
produced by:
hits="$(git grep -n MONGO_DISALLOW_COPYING | cut -d: -f1 )"
for f in "$hits"; do
sed -i.orig '
s/^\( *\)MONGO_DISALLOW_COPYING(\(.*\));/\1\2(const \2\&) = delete;\n\1\2\& operator=(const \2\&) = delete;/;
' $f
done
|
| |
|
| |
|
|
|
|
|
|
| |
Remove leading comments that are just stating the filename.
Move any file-level comments below the copyright banner.
Remove leading blank lines.
|
|
|
|
|
| |
Refactor the baton into regular and networking batons while also
cleaning up the basic baton implementation.
|
|
|
|
| |
standard conformant.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some tests in `dbtest` do not use the `mongo::unittest::Test` class
as a basis for their implementation and thus need some way to benefit
from global DB Environment initialization functions. Specifically
the changes in SERVER-32630 required `serverCompatibilityVersion`
to be set sensibly. Some tests in `dbtest` were not correctly
getting this benefit; instead only incidentally getting a correct
setting by accident, as the results of an unintended residue of
an earlier operation. This can lead to inconsistentcies in which
tests pass, as link order changes -- the tests are registered using
static initialization, whose instability of order can cause
mysterious failures in `dbtest`.
|
|
|
|
|
|
|
|
| |
Macro ON_BLOCK_EXIT(...) now takes a single callable,
Some renames:
Dismias -> dismiss
MakeGuard => makeGuard
|
| |
|
| |
|
|
|
|
| |
This required plumbing unique_function into many more places.
|
| |
|
|
|
|
|
|
|
| |
GCC-8 doesn't treat `_Pragma(...)` ignore directives in
macros the way that Clang does. Instead of this technique, we'll
make the requirement on `ASSERT_THROWS`' parameter an expression,
not a statement.
|
| |
|
| |
|
|
|
|
|
|
| |
It shouldn't be necessary to explicitly ignore status returns in
functions when testing their throw behavior - the test is sufficient
to indicate that `Status` is ignored.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
SERVER-35169 Bump wire protocol version for 4.2.
SERVER-35752 Ensure tests that rely on FCV pass after updating FCV constants.
SERVER-35163 Unblacklist tests that expect FCV version to differ between "last-stable" and "latest."
SERVER-34984 Update major_version_upgrade.js to call setFCV to the latest FCV.
SERVER-35656 Ensure a 4.0 mongos crashes upon attempting to connect to an FCV 4.2 cluster.
SERVER-35404 Re-enable the sharding_last_stable_mongos_and_mixed_shards suite.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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).
|
| |
|
|
|
|
| |
death tests.
|
|
|
|
| |
rpc/protocol
|
| |
|
|
|
|
|
|
|
|
| |
Migrate to 1 connection pool in mongos.
This change involves the introduction of a transport layer baton, which
improves perf for a particular transport layer when doing local
scatter/gather operations.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
- ServiceContext* is now closer to be an instance context for the database. We still don't support multiple instances but I wrote the new code with this in mind. Teardown and reinitialize then becomes a matter of being able to delete and re-create the ServiceContext*.
- Use the new MONGO_INITIALIZER that supports deinit/reinit to be able to re-initialize global systems that are decorations on ServiceContext.
- Move creation/destruction of ServiceContext* out of MONGO_INITIALIZER. This so we can hold an exclusive lock during as much as possible of the shutdown (like how mongod does)
- New ServiceContext registrer where we can link in different implementations of ServiceContext (replaces the SetGlobalEnvironment MONGO_INITIALIZER)
- As a result the SetGlobalEnvironment prerequisite for MONGO_INITIALIZERs is gone.
- The ServiceContext is passed to runGlobalInitializers, put in InitializationContext/DeinitializationContext so the initializers know which context they operate on.
|
|
|
|
|
| |
Appenders and LogDomains now use unique ptrs internally and on
signature.
|
|
|
|
| |
initialization.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use unique_ptr instead of shared_ptr.
Simplify with range-based for loops and auto where appropriate.
Change ASSERT_EQ guts to rely less on macros.
Change the reserved _[A-Z] names (use trailing underscore instead).
Change a vector<T*> to vector<unique_ptr<T>>.
Change shared_ptr<T*> to unique_ptr<T>.
Add a comment to mongoutils::str::stream lamenting missing relops.
Add static to comparator() members.
Add static constexpr to name() members.
|