| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
(cherry picked from commit 5985d757ddc2645fb1b5df88f78abf6b9a833452)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
(cherry picked from commit 11de948b0c50df7d12de09ae0f01e791fc5d70d7)
|
|
|
|
|
|
|
|
| |
When a writable collection is requested from the catalog a cloned instance will be returned.
Its lifetime is managed by default in a WriteUnitOfWork and committed into the catalog in a commit handler.
In the case of a rollback the cloned and modified collection instance is simply discarded.
This removes the need to setup rollback handlers to restore any state written to a collection in the case of a rollback.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
| |
partial index filters
|
| |
|
|
|
|
|
|
|
| |
* Remove setPlainConsoleLogger()
* Update errorcodes linter to work with custom user defined log macros
rename src/mongo/embedded/{embedded_log_appender.h => embedded_log_backend.h} (61%)
|
|
|
|
|
|
|
|
|
|
|
| |
builds on startup
If a replica set node is started in standalone mode and there are
incomplete two-phase index builds, instead of restarting them, we mark
the indexes as 'frozen'. This signifies that the indexes are unusable,
and will not be rebuilt. The only option available to users is to drop
the index. This can corrupt the replica set, but modifying replicated
data in standalone mode already poses this danger.
|
| |
|
|
|
|
|
|
| |
multi-document transactions
Now that we update the multikey flag within a transaction in a side transaction, the in-memory state about the multikey write will be naturally visible to subsequent writes inside the transaction, so we don't need to keep around any extra structures to enforce this anymore.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
already being built wait for them to complete rather than return OK immediately
|
|
|
|
|
|
|
|
|
| |
and flexible.
- Remove a "$freelist" collection reference, which was removed with MMAPv1
- Modularize a {buildIndexes:false} check that causes a IndexAlreadyExists error to be returned
- Split IndexCatalog::removeExistingIndexes into removeExistingIndexes and removeExistingIndexesNoChecks,
to be more explicit about the internal behavior.
|
|
|
|
| |
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
|
|
|
|
| |
pass it as a function parameter
|
|
|
|
| |
instead as function parameters
|
| |
|
| |
|
| |
|
|
|
|
| |
invalid non-duplicate indexes
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
multiplanning.
These stages hold the collection's list of indices during
plan selection, and expect all indices in this list to
remain valid until plan selection completes.
|
|
|
|
| |
background, non-unique indexes. Change background index builds to use the bulk builder and external sorter
|
| |
|
|
|
|
|
| |
- IndexIterator returns IndexCatalogEntry*
- Split out ready from building indexes in the IndexCatalog.
|
| |
|
|
|
|
|
|
| |
This change only applies to collection renames within the
same database. Rename across databases requires copying the
data, and the resulting collection will have a new UUID.
|
| |
|
| |
|
|
|
|
| |
and obsolete MMAP specific helper functions
|
| |
|
|
|
|
| |
with its oplog entry.
|
|
|
|
|
|
|
|
| |
The `MONGO_DECLARE_SHIM`, `MONGO_DEFINE_SHIM`, and `MONGO_REGISTER_SHIM`
macros can be used to create specialized types which are customization
and auto-registration points for late-binding functions. In some
sense they work like weak-symbols; however, they also are useful for
tracking dependencies upon shimmed-out implementations.
|
|
|
|
| |
This reverts commit 2227f272a7a0a3e43625cb2d4a2704e1ccb6f893.
|
|
|
|
|
|
|
|
| |
The `MONGO_DECLARE_SHIM`, `MONGO_DEFINE_SHIM`, and `MONGO_REGISTER_SHIM`
macros can be used to create specialized types which are customization
and auto-registration points for late-binding functions. In some
sense they work like weak-symbols; however, they also are useful for
tracking dependencies upon shimmed-out implementations.
|
| |
|
|
|
|
|
|
| |
These headers date from before C++11 support and the `::mongo::stdx::`
namespace. They can be removed and uses of the names therein can
be changed to `::mongo::stdx::unordered_`* forms.
|
| |
|
|
|
|
| |
This function throws an exception on error or fasserts.
|