diff options
Diffstat (limited to 'src/mongo/db/ops/insert.cpp')
-rw-r--r-- | src/mongo/db/ops/insert.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/db/ops/insert.cpp b/src/mongo/db/ops/insert.cpp index cfc9b10f35f..3cddceac1d5 100644 --- a/src/mongo/db/ops/insert.cpp +++ b/src/mongo/db/ops/insert.cpp @@ -39,7 +39,7 @@ using std::string; using namespace mongoutils; -StatusWith<BSONObj> fixDocumentForInsert(const BSONObj& doc) { +StatusWith<BSONObj> fixDocumentForInsert(ServiceContext* service, const BSONObj& doc) { if (doc.objsize() > BSONObjMaxUserSize) return StatusWith<BSONObj>(ErrorCodes::BadValue, str::stream() << "object to insert too large" @@ -124,7 +124,7 @@ StatusWith<BSONObj> fixDocumentForInsert(const BSONObj& doc) { if (hadId && e.fieldNameStringData() == "_id") { // no-op } else if (e.type() == bsonTimestamp && e.timestampValue() == 0) { - b.append(e.fieldName(), getNextGlobalTimestamp()); + b.append(e.fieldName(), getNextGlobalTimestamp(service)); } else { b.append(e); } |