summaryrefslogtreecommitdiff
path: root/src/mongo/db/storage/biggie
diff options
context:
space:
mode:
authorLingzhi Deng <lingzhi.deng@mongodb.com>2019-06-12 15:49:24 -0400
committerLingzhi Deng <lingzhi.deng@mongodb.com>2019-07-08 21:33:37 -0400
commite7abff841a2f5cf6c3bc71a344e347f6342822b0 (patch)
tree84e457cde984e2f150b1b2537a1de29a6c1c0b8a /src/mongo/db/storage/biggie
parent740dbbec28c970befdfea5177957916882bffa2b (diff)
downloadmongo-e7abff841a2f5cf6c3bc71a344e347f6342822b0.tar.gz
SERVER-35353: Use MutableOplogEntry class to build up oplog entries progressively
Diffstat (limited to 'src/mongo/db/storage/biggie')
-rw-r--r--src/mongo/db/storage/biggie/biggie_record_store.cpp47
-rw-r--r--src/mongo/db/storage/biggie/biggie_record_store.h6
2 files changed, 0 insertions, 53 deletions
diff --git a/src/mongo/db/storage/biggie/biggie_record_store.cpp b/src/mongo/db/storage/biggie/biggie_record_store.cpp
index 60a6dcdfd04..6e656149170 100644
--- a/src/mongo/db/storage/biggie/biggie_record_store.cpp
+++ b/src/mongo/db/storage/biggie/biggie_record_store.cpp
@@ -187,53 +187,6 @@ Status RecordStore::insertRecords(OperationContext* opCtx,
return Status::OK();
}
-Status RecordStore::insertRecordsWithDocWriter(OperationContext* opCtx,
- const DocWriter* const* docs,
- const Timestamp*,
- size_t nDocs,
- RecordId* idsOut) {
- int64_t totalSize = 0;
- for (size_t i = 0; i < nDocs; i++)
- totalSize += docs[i]->documentSize();
-
- // Caller will retry one element at a time.
- if (_isCapped && totalSize > _cappedMaxSize)
- return Status(ErrorCodes::BadValue, "object to insert exceeds cappedMaxSize");
-
- auto ru = RecoveryUnit::get(opCtx);
- StringStore* workingCopy(ru->getHead());
- {
- SizeAdjuster adjuster(opCtx, this);
- for (size_t i = 0; i < nDocs; i++) {
- const size_t len = docs[i]->documentSize();
-
- std::string buf(len, '\0');
- docs[i]->writeDocument(&buf[0]);
-
- int64_t thisRecordId = 0;
- if (_isOplog) {
- StatusWith<RecordId> status = oploghack::extractKey(buf.data(), len);
- if (!status.isOK())
- return status.getStatus();
- thisRecordId = status.getValue().repr();
- _visibilityManager->addUncommittedRecord(opCtx, this, RecordId(thisRecordId));
- } else {
- thisRecordId = _nextRecordId();
- }
- std::string key = createKey(_ident, thisRecordId);
-
- StringStore::value_type vt{key, buf};
- workingCopy->insert(std::move(vt));
- if (idsOut)
- idsOut[i] = RecordId(thisRecordId);
- ru->makeDirty();
- }
- }
-
- _cappedDeleteAsNeeded(opCtx, workingCopy);
- return Status::OK();
-}
-
Status RecordStore::updateRecord(OperationContext* opCtx,
const RecordId& oldLocation,
const char* data,
diff --git a/src/mongo/db/storage/biggie/biggie_record_store.h b/src/mongo/db/storage/biggie/biggie_record_store.h
index 813c575ecf7..e8dee66da1c 100644
--- a/src/mongo/db/storage/biggie/biggie_record_store.h
+++ b/src/mongo/db/storage/biggie/biggie_record_store.h
@@ -75,12 +75,6 @@ public:
std::vector<Record>* inOutRecords,
const std::vector<Timestamp>& timestamps);
- virtual Status insertRecordsWithDocWriter(OperationContext* opCtx,
- const DocWriter* const* docs,
- const Timestamp*,
- size_t nDocs,
- RecordId* idsOut);
-
virtual Status updateRecord(OperationContext* opCtx,
const RecordId& oldLocation,
const char* data,