diff options
author | Jordi Olivares Provencio <jordi.olivares-provencio@mongodb.com> | 2022-07-15 14:46:25 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-07-15 16:26:15 +0000 |
commit | d8616301f12951868e52e19cd696cff620caa28e (patch) | |
tree | 8e3ddeddae9ba83be8899c93cbfa465fda7e20a9 /src/mongo/db/record_id_helpers.h | |
parent | 6af105aa73b7e3ed88186a14a5e832434af65863 (diff) | |
download | mongo-d8616301f12951868e52e19cd696cff620caa28e.tar.gz |
SERVER-67471 Improve RecordId usage performance
Diffstat (limited to 'src/mongo/db/record_id_helpers.h')
-rw-r--r-- | src/mongo/db/record_id_helpers.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mongo/db/record_id_helpers.h b/src/mongo/db/record_id_helpers.h index b957b30cce6..282132dd684 100644 --- a/src/mongo/db/record_id_helpers.h +++ b/src/mongo/db/record_id_helpers.h @@ -72,8 +72,8 @@ StatusWith<RecordId> extractKeyOptime(const char* data, int len); * RecordId because it loses information about the original RecordId format. If you require passing * a RecordId as a token or storing for a resumable scan, for example, use RecordId::serializeToken. */ -void appendToBSONAs(RecordId rid, BSONObjBuilder* builder, StringData fieldName); -BSONObj toBSONAs(RecordId rid, StringData fieldName); +void appendToBSONAs(const RecordId& rid, BSONObjBuilder* builder, StringData fieldName); +BSONObj toBSONAs(const RecordId& rid, StringData fieldName); /** * Enumerates all reserved ids that have been allocated for a specific purpose. These IDs may not be @@ -89,7 +89,7 @@ RecordId reservedIdFor(ReservationId res, KeyFormat keyFormat); /** * Returns true if this RecordId falls within the reserved range for a given RecordId type. */ -bool isReserved(RecordId id); +bool isReserved(const RecordId& id); } // namespace record_id_helpers } // namespace mongo |