| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
removed places where ns.ns() is called
changed stringdata to namespace string for lookup function
update view catalog
update view catalog test
fixed test
fixed create coll
|
|
|
|
|
|
|
|
|
|
|
| |
reply on the copy-on-write machinery to keep it in sync with the durable catalog.
All updates to the metadata needs to happen through the Collection, moved interfaces from the DurableCatalog to the Collection.
Removed back pointer to Collection in IndexCatalogEntryImpl, interfaces now correctly take a const or non-const Collection. This should make its iterface const-correct to avoid making bugs where the copy-on-write system for Collections are bypassed.
Multikey handle is special as it needs to happen without exclusive access to the Collection. Implemented isolation for the Collection metadata when multikey is changed. It handles multi-doc transactions and is only commited to the Collection instance after the write to the durable catalog successfully commits.
listCollections and listIndexes can now safetly read the metadata cache without needing to read from the durable catalog making them safe to do without Collection level locks.
|
| |
|
| |
|
| |
|
|
|
|
| |
clustered collections
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
cause dbHash to return a SnapshotUnavailable error
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
After this change, the interface is sensible for both the classic
and SBE engines (with the exception of 'getRootStage()' which is left
as future work).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
This eliminates the need for the FAILURE status codes in
PlanStage and PlanExecutor, and brings query execution's
error reporting more in line with that of the rest of the
server. It also makes it easier for future implementations
of PlanExecutor to comply with the interface.
|
| |
|
|
|
|
|
|
| |
- Remove several legacy logger/ files
- Convert all MONGO_LOG_DEFAULT_COMPONENT to the LOGV2 version.
- Globally replace logger::{LogSeverity,LogComponent} => logv2::
|
|
|
|
|
|
| |
- Add flag to renameCollection command to know when the source collection is temporary
- Prevent checks of isSharded on secondaries
- Prevent checks of isSharded on temporary collections
|
|
|
|
| |
cloneCollectionAsCapped
|
|
|
|
| |
covertToCapped
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
instead of Namespace.
|
|
|
|
| |
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
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
OperationShardingState
ShardingState logically contains answers to questions about whether the
current instance is node in a sharded cluster, whereas
OperationShardingState is responsible for the 'shardedness' of the
commands.
|
|
|
|
|
|
| |
Remove leading comments that are just stating the filename.
Move any file-level comments below the copyright banner.
Remove leading blank lines.
|
|
|
|
|
| |
Takes care of PlanExecutor states. In some cases we log more
information for former DEAD state scenarios now.
|
| |
|
|
|
|
|
|
|
| |
This is a pure refactor with no user-facing changes. It is
the first step in making PlanExecutors check their own
validity during yield recovery, rather than requiring the
invalidating actor to issue a kill notification.
|
| |
|
|
|
|
|
|
|
|
|
| |
Previously, Collection::updateDocument expected to get a namespace and
UUID from its OplogEntryUpdateArgs, but that is not necessary, because
the collection already knows its own namespace and UUID. This caused a
problem in DurableViewCatalogImpl::upsert(), which did not set the
UUID value in the args, leading to oplog entries without their UUID
value.
|
|
|
|
|
|
|
|
| |
convertToCapped
Closes #1206
Signed-off-by: Siyuan Zhou <siyuan.zhou@mongodb.com>
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
decoration through service context (global if needed).
This reverts commit a8fddd07a740e959646995ef93139887b3b3eb5c.
|