| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
There are two patches here really. One of which makes killOp fast to use
and visible. The other adds OperationKey to various places and maps it
to an internal OpId.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Rename utils/mongoutils/str.h => utils/str.h
Rename namespace mongoutils::str => str
Rename mongo::strcasecmp => str::caseInsensitiveCompare.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Operation context currently relies on an elaborate dance between the
client lock, _waitMutex, _waitCV and _numKillers to allow markKilled to
tap the condvar an opctx is waiting on.
After the introduction of batons on all opctx's, this is no longer
necessary (as batons have their own support for being woken, while
waiting on a condvar). Removing the special killing code will simplify
opctx, and remove a lot of extra book keeping.
|
|
|
|
|
|
| |
The checks performed in functions that are never passed a nullptr and
would crash later if null was ever passed. Removing the checks makes
coverity happy.
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
client operations
|
| |
|
|
|
|
| |
parameter “closeConnectionsOnStepdown”.
|
| |
|
| |
|
|
|
|
| |
should transfer using unique_ptr.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
| |
subclasses to new library.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
- 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.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
context"
This reverts commit f7f3946600e6a5c6612ba6763ca91d93b5a023f7.
|
| |
|
|
|
|
|
|
| |
context"
This reverts commit ee08e773208ca4421c72913048915c20b75fac80.
|
| |
|
|
|
|
| |
OperationContext
|
| |
|
| |
|
| |
|
|
|
|
| |
LogicalSessionId
|
|
|
|
| |
operations
|
|
|
|
|
|
| |
This commit is an automated rename of all whole word instances of txn,
_txn, and txnPtr to opCtx, _opCtx, and opCtxPtr, respectively in all
.cpp and .h files in src/mongo.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
During shutdown a number of things are currently happening that shouldn't be:
1. The legacy transport layer is failing to actually close sockets in closeAll. It's doing this
because the default argument to closeAll is to leave all sockets open on the legacy transport layer
(versus to close them on the actual interface header).
2. The thing we're checking for in shutdown is wrong. It's just that we've left recv in all db
workers, rather than that we've left all client workers (so ASAN is occasionally unhappy about
"leaks")
3. Tests rely on external callers to close sockets. when this contract changes, we take an extra 10
seconds to shut down every mongod, making some tests time out.
Fix this by adding a counter for actual live workers, so we can track when it's safe to shutdown
correctly. Also fix the typo
|
| |
|
|
|
|
|
| |
Expand the transport layer as needed to replace uses of abstract message port for ingress
networking.
|
|
|
|
|
|
|
| |
into OperationContext.
This change also moves responsibility for registering OperationContexts to Clients into
ServiceContext::makeOperationContext.
|
|
|
|
| |
ServiceContext.
|
|
|
|
| |
ServiceContextMongoD to ServiceContext.
|
|
|
|
|
|
|
| |
Now they only need to be set in cases where the defaults need to be changed.
Tests that just want the defaults can link against
$BUILD_DIR/mongo/db/service_context_noop_init to get a working global
ServiceContext.
|