summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Bligh <mbligh@mongodb.com>2015-10-30 16:50:27 -0400
committerMartin Bligh <mbligh@mongodb.com>2015-10-30 16:51:11 -0400
commitaa2c2ac32a50f746c8854fdeb3719623853affa4 (patch)
treef4d529958cb86df86bd48718fc6799dc146384fd
parentbc4c37302da66de59fe559e412bcd7eb8cbe72b5 (diff)
downloadmongo-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.cpp4
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, &currentRangeEndKey));
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) {