-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Labels:None
-
Storage Execution
With lock-free reads, we can gain a decent speedup by not reading from the durable catalog for every index that we use in a transaction.
This diff results in a green patch, and with some experimental results, speedups for some transactions workloads.
Unable to find source-code formatter for language: diff. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
diff --git a/src/mongo/db/catalog/index_catalog_entry_impl.cpp b/src/mongo/db/catalog/index_catalog_entry_impl.cpp index 94e09994b0c..c27d8cda7f9 100644 --- a/src/mongo/db/catalog/index_catalog_entry_impl.cpp +++ b/src/mongo/db/catalog/index_catalog_entry_impl.cpp @@ -120,18 +120,6 @@ void IndexCatalogEntryImpl::init(std::unique_ptr<IndexAccessMethod> accessMethod bool IndexCatalogEntryImpl::isReady(OperationContext* opCtx, const CollectionPtr& collection) const { - // For multi-document transactions, we can open a snapshot prior to checking the - // minimumSnapshotVersion on a collection. This means we are unprotected from reading - // out-of-sync index catalog entries. To fix this, we uassert if we detect that the - // in-memory catalog is out-of-sync with the on-disk catalog. - if (opCtx->inMultiDocumentTransaction()) { - if (!isPresentInMySnapshot(opCtx) || isReadyInMySnapshot(opCtx) != _isReady) { - uasserted(ErrorCodes::SnapshotUnavailable, - str::stream() << "Unable to read from a snapshot due to pending collection" - " catalog changes; please retry the operation."); - } - } -
- depends on
-
SERVER-59444 Enable lock-free reads with multi-document transactions
- Backlog