| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
copy-on-write.
Internal mutexes when reading CollectionCatalog are removed, just one mutex for writes are needed.
Lock-free reads helper AutoGetCollectionForReadLockFree stashes a CollectionCatalog consistent with snapshot on OperationContext
|
|
|
|
|
|
|
|
|
|
|
| |
owned by AutoGetCollection
RequiresCollectionStage now holds a pointer to CollectionPtr owned by an AutoGetCollection.
When we save and restore the executor a new CollectionPtr pointer needs to be assigned.
Plan executors can no longer be created with temporary CollectionPtr instances and their interface have been changed to take pointers to avoid binding to rvalues.
RequiresCollectionStage no longer loads collections from the catalog and will be in sync with the owning AutoGetCollection.
|
|
|
|
|
|
|
|
|
|
|
|
| |
It implements a yieldable interface that is used to re-load the
Collection pointer from the catalog after a yield that released locks.
With lock-free reads and copy-on-write on Collection instances releasing
locks without notifying an AutoGetCollection at a higher level may cause
its pointers to dangle if a MODE_X writer installs a new Collection
instance in the catalog.
CollectionPtr should be passed by const reference so a yield can notify
all the way up.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
inside a WUOW by default
There are three modes when accessing a writable Collection:
* Managed in WUOW (default)
* Unmanaged (users need to commit/rollback)
* Inplace that provides direct access to the Collection in the catalog. (Users need to ensure there's no concurrent operations going on)
Added a helper RAII type CollectionWriter that abstract the three modes above and also provides abstraction on different methods of accessing Collections (AutoGetCollection or manual lookups).
Writable Collection is aquired lazily when needed (usually inside a WUOW).
|
|
|
|
|
|
| |
Most of the code should only need a const Collection now. AutoGetCollection returns a const Collection by default. There is a placeholder getWritableCollection() interface that will handle the necessary steps we need for lock free reads in the future.
Added some operators to AutoGetCollection so it behaves more like a smart pointer.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the master branch
This is an initial commit for the slot-based execution engine (SBE) which contains:
* Implementation of the core slot-based engine.
* The SBE stage builder, which is responsible for translating a QuerySolution tree
into an SBE plan.
* Other changes necessary for integration with the find command.
Co-authored-by: Anton Korshunov <anton.korshunov@mongodb.com>
Co-authored-by: Justin Seyster <justin.seyster@mongodb.com>
Co-authored-by: David Storch <david.storch@mongodb.com>
|
| |
|
| |
|
|
|
|
|
|
| |
- Remove several legacy logger/ files
- Convert all MONGO_LOG_DEFAULT_COMPONENT to the LOGV2 version.
- Globally replace logger::{LogSeverity,LogComponent} => logv2::
|
|
|
|
|
|
|
| |
o converting some log lines that were missed
o fixing some missing includes
create mode 100644 src/mongo/transport/ismaster_metrics.cpp
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Two concurrent storage transactions can now create collections with the same
collection name. These transactions will conflict at commit time; the first
committer will win and register their collection into the global catalog. The
losing transactions will bubble a WriteConflictException.
Top-level callers that should fail if the collection already existed must now
check and fail with a NamespaceExists error code. Previously, those callers
could rely on lower level code returning the NamespaceExists error.
Callers that were implicitly creating a collection may retry the operation,
using the now-registered collection.
These transaction-local collections (UncommittedCollections) are returned when
doing any CollectionCatalog::lookup* call.
|
| |
|
|
|
|
| |
CollectionCatalog::get().lookupCollectionByNamespace()
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
parallel IndexBuildsCoordinator checks for all BackgroundOperation checks
|
|
|
|
|
|
| |
layer; add parallel IndexBuildsCoordinator checks for all BackgroundOperation checks"
This reverts commit d02edd5290131978f901ffc657bee3470d03f8fd.
|
|
|
|
| |
parallel IndexBuildsCoordinator checks for all BackgroundOperation checks
|
| |
|
|
|
|
|
|
| |
Remove leading comments that are just stating the filename.
Move any file-level comments below the copyright banner.
Remove leading blank lines.
|
| |
|
|
|
|
| |
drag in new commands.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
All remaining callers are transitioned to some form of usassert. This was done
with an elaborate set of vim macros to make this tractable. Therefore it
should not be considered an example of the best way to write new code, just as
an improvement on what was there before. In particular, I couldn't easily
remove Status's that are named then only used once in uassertStatusOK, nor
could I convert the pattern of checking a StatusWith<T>'s getStatus() then
calling getValue() to just call uassertStatusOK(returnsStatusWith()).
|
|
|
|
| |
standalone process applications. Refactored commands libraries throughout the codebase and made their uses be LIBDEPS_PRIVATE when possible as most commands don't export any symbols and don't even have headerfiles.
|
| |
|
|
|
|
|
|
| |
decoration through service context (global if needed).
This reverts commit a8fddd07a740e959646995ef93139887b3b3eb5c.
|
|
|
|
|
|
| |
getting decoration through service context (global if needed)."
This reverts commit 7d37a75df3f6035a7afcb51123b88f0e99308fc8.
|
|
|
|
| |
decoration through service context (global if needed).
|
|
|
|
| |
getting interfaces without using global get function.
|
| |
|
|
|
|
|
|
| |
w/fix: update a new command to secondaryAllowed
This reverts commit d75cb425fbc3cf4b569eb1722c3f8abec45654a2.
|
|
|
|
| |
This reverts commit be24b0323d3f2d424d9e22337f4221d39001ac31.
|
|
|
|
| |
declare read_preference dep. update service_entry_opint_embedded
|
| |
|
| |
|
|
|
|
| |
It is now only used by commands deriving from ErrmsgCommandDeprecated.
|
| |
|
| |
|
|
|
|
| |
foreign namespaces
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Ensures that a collection lock is held in at least MODE_IS while
deregistering a PlanExecutor from the cursor manager. Introduces new
PlanExecutor::dispose() and ClientCursor::dispose() methods that must be
called before destruction of those classes, and ensures they are called
before destruction. These calls will thread an OperationContext all the
way through to DocumentSource::dispose() for each stage in a Pipeline,
which will give DocumentSourceCursor a chance to acquire locks and
deregister its PlanExecutor if necessary.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Removes the class 'ScopedTransaction' and moves the responsibility of
abandoning the snapshot onto the GlobalLock class. Also renames the
AutoGetCollectionForRead class to AutoGetCollectionForReadCommand, and
adds a new AutoGetCollectionForRead class. Unlike
AutoGetCollectionForReadCommand, this new class will not update the
namespace on the CurrentOp object, nor will it add an entry to Top.
|
|
|
|
|
|
| |
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.
|