diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mongo/db/storage/wiredtiger/wiredtiger_record_store.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_record_store.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_record_store.cpp index 17f49d7566f..237a4b8feeb 100644 --- a/src/mongo/db/storage/wiredtiger/wiredtiger_record_store.cpp +++ b/src/mongo/db/storage/wiredtiger/wiredtiger_record_store.cpp @@ -1980,10 +1980,10 @@ boost::optional<Record> WiredTigerRecordStoreCursorBase::next() { return {}; } - if ((_forward && _lastReturnedId >= id) || - MONGO_unlikely(WTRecordStoreUassertOutOfOrder.shouldFail())) { + const bool failWithOutOfOrderForTest = WTRecordStoreUassertOutOfOrder.shouldFail(); + if ((_forward && _lastReturnedId >= id) || MONGO_unlikely(failWithOutOfOrderForTest)) { // Crash when test commands are enabled and not explicitly uasserting on out-of-order keys. - if (!WTRecordStoreUassertOutOfOrder.shouldFail()) { + if (!failWithOutOfOrderForTest) { invariant(!getTestCommandsEnabled()); } |