From 8c30569f58cbed7a0c48300b311a8d44539a05b4 Mon Sep 17 00:00:00 2001 From: Yu Jin Kang Park Date: Wed, 23 Mar 2022 11:14:57 +0000 Subject: SERVER-64498: Add WT_ROLLBACK check in addition to WT_CACHE_FULL --- src/mongo/db/storage/wiredtiger/wiredtiger_record_store.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/mongo/db/storage') diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_record_store.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_record_store.cpp index 8cb5ce919ad..4666a7b3a50 100644 --- a/src/mongo/db/storage/wiredtiger/wiredtiger_record_store.cpp +++ b/src/mongo/db/storage/wiredtiger/wiredtiger_record_store.cpp @@ -1950,7 +1950,8 @@ void WiredTigerRecordStore::_initNextIdIfNeeded(OperationContext* opCtx) { // largest_key API returns the largest key in the table regardless of visibility. This ensures // we don't re-use RecordIds that are not visible. int ret = cursor->largest_key(cursor); - if (ret == WT_CACHE_FULL) { + // TODO (SERVER-64461): Remove WT_CACHE_FULL error check after WT-8767 + if (ret == WT_CACHE_FULL || ret == WT_ROLLBACK) { // Force the caller to rollback its transaction if we can't make progess with eviction. // TODO (SERVER-63620): Convert this to a different error code that is distinguishable from // a true write conflict. -- cgit v1.2.1