32 #include "mongo/db/curop.h" 33 #include "mongo/db/operation_context.h" 36 #include "mongo/util/fail_point_service.h" 65 MONGO_FAIL_POINT(WTPrepareConflictForReads) ? WT_PREPARE_CONFLICT :
WT_READ_CHECK(f());
67 if (ret != WT_PREPARE_CONFLICT)
70 ++CurOp::get(opCtx)->debug().prepareReadConflicts;
73 recoveryUnit->getSessionCache()->waitUntilPreparedUnitOfWorkCommitsOrAborts(opCtx);
#define WT_READ_CHECK(x)
Identical to WT_OP_CHECK except this is checked on cursor seeks/advancement.
Definition: wiredtiger_record_store.h:62
Copyright (C) 2014 MongoDB Inc.
Definition: bson_collection_catalog_entry.cpp:38
MONGO_FAIL_POINT_DECLARE(WTPrepareConflictForReads)
int wiredTigerPrepareConflictRetry(OperationContext *opCtx, F &&f)
Runs the argument function f as many times as needed for f to return an error other than WT_PREPARE_C...
Definition: wiredtiger_prepare_conflict.h:56
static WiredTigerRecoveryUnit * get(OperationContext *opCtx)
Definition: wiredtiger_recovery_unit.h:139
void wiredTigerPrepareConflictLog(int attempts)
Logs a message with the number of prepare conflict retry attempts.
Definition: wiredtiger_prepare_conflict.cpp:44
Collection *const OperationContext *const opCtx
Definition: collection_impl.cpp:80