diff options
author | Martin Bligh <mbligh@mongodb.com> | 2015-10-30 16:50:27 -0400 |
---|---|---|
committer | Martin Bligh <mbligh@mongodb.com> | 2015-10-30 16:51:11 -0400 |
commit | aa2c2ac32a50f746c8854fdeb3719623853affa4 (patch) | |
tree | f4d529958cb86df86bd48718fc6799dc146384fd | |
parent | bc4c37302da66de59fe559e412bcd7eb8cbe72b5 (diff) | |
download | mongo-aa2c2ac32a50f746c8854fdeb3719623853affa4.tar.gz |
SERVER-21008: Add missing part of patch "Fixed cappedDelete to keep track of beginning of collection so it skips tombstones"
-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) { |