// Copy a range of documents to the local oplog.refs collection static void copyOplogRefsRange(OplogReader &r, OID oid) { shared_ptr<DBClientCursor> c = r.getOplogRefsCursor(oid); Client::ReadContext ctx(rsOplogRefs); while (c->more()) { BSONObj b = c->next(); BSONElement eOID = b.getFieldDotted("_id.oid"); if (oid != eOID.OID()) { break; } LOG(6) << "copyOplogRefsRange " << b << endl; writeEntryToOplogRefs(b); } }
void logOpsToOplogRef(BSONObj o) { LOCK_REASON(lockReason, "repl: logging to oplog.refs"); Lock::DBRead lk("local", lockReason); writeEntryToOplogRefs(o); }
void logOpsToOplogRef(BSONObj o) { Lock::DBRead lk("local"); writeEntryToOplogRefs(o); }