diff options
-rw-r--r-- | src/mongo/db/storage/wiredtiger/wiredtiger_record_store.cpp | 4 |
1 files changed, 1 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 58dc3cacdb2..951f1d0eec8 100644 --- a/src/mongo/db/storage/wiredtiger/wiredtiger_record_store.cpp +++ b/src/mongo/db/storage/wiredtiger/wiredtiger_record_store.cpp @@ -1078,8 +1078,6 @@ int64_t WiredTigerRecordStore::cappedDeleteAsNeeded_inlock(OperationContext* txn } invariantWTOK(truncateEnd->prev(truncateEnd)); // put the cursor back where it was - int64_t currentRangeEndKey; - invariantWTOK(truncateEnd->get_key(truncateEnd, ¤tRangeEndKey)); WiredTigerCursor startWrap(_uri, _tableId, true, txn); WT_CURSOR* truncateStart = startWrap.get(); @@ -1101,7 +1099,7 @@ int64_t WiredTigerRecordStore::cappedDeleteAsNeeded_inlock(OperationContext* txn _increaseDataSize(txn, -sizeSaved); wuow.commit(); // Save the key for the next round - _cappedFirstRecord = _fromKey(currentRangeEndKey); + _cappedFirstRecord = firstRemainingId; } } } catch (const WriteConflictException& wce) { |