| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
|
|
|
| |
This reverts commit 9662f3c9edfd52ce4c9b0cad619bed57562a3daa.
|
| |
|
| |
|
|
|
|
| |
This removes the snapshotRead:false option to dbCheck which blocked concurrent writes
|
| |
|
| |
|
|
|
|
| |
WriteConflictException
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Implicitly replicated namespaces are internal namespaces that do not replicate
writes, with the exception of deletions, user-initiated direct writes and some
maintenance operations.
This patch lists config.system.preimages, config.images_collection,
config.transactions and config.changes.* as implicitly replicated namespaces,
and unifies and validates their semantics. It also special-cases some of the
config.transactions replication behaviour that is too specific to be generalised.
|
| |
|
| |
|
|
|
|
|
|
|
| |
The dbCheck command accepts an optional (default true) parameter,
'snapshotRead', that uses point-in-time reads to check each batch. When
true, dbCheck does not block writes. When set to false, dbCheck reverts to
blocking writes.
|
|
|
|
| |
This also makes various resiliency improvements to dbCheck
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
collections
* Acquire database lock in MODE_IS between batches
* Acquire database lock in MODE_IS when listing collections
* Remove MODE_IX lock acquisition of the local db
* Downgrade severity to warning for collections that are not consistent by design
* Downgrade severity to info for collections that are dropped partway through
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
operate on first element
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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()
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
dbCheck
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Remove leading comments that are just stating the filename.
Move any file-level comments below the copyright banner.
Remove leading blank lines.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
comparison semantics
|