Details
-
Improvement
-
Resolution: Unresolved
-
Major - P3
-
None
-
None
-
None
-
None
-
Storage Execution
Description
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.
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.");
|
- }
|
- }
|
- |
Attachments
Issue Links
- depends on
-
SERVER-59444 Enable lock-free reads with multi-document transactions
-
- Backlog
-