diff options
author | jannaerin <golden.janna@gmail.com> | 2022-06-14 14:57:45 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-06-14 16:36:58 +0000 |
commit | 66566c2abd31219d8ace67b4dce19621e49bf8ce (patch) | |
tree | 8973fb18da828ae66d6cdb08ff7cd4f8402e3c96 /src/mongo/db/tenant_id.h | |
parent | e7f4004be036eb1e009d54b913cebb140d6182c1 (diff) | |
download | mongo-66566c2abd31219d8ace67b4dce19621e49bf8ce.tar.gz |
SERVER-66963 Improve performance of NamespaceString and DatabaseName construction
Diffstat (limited to 'src/mongo/db/tenant_id.h')
-rw-r--r-- | src/mongo/db/tenant_id.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/mongo/db/tenant_id.h b/src/mongo/db/tenant_id.h index 7af08a45d95..dc9b46705c3 100644 --- a/src/mongo/db/tenant_id.h +++ b/src/mongo/db/tenant_id.h @@ -55,12 +55,12 @@ public: */ static const TenantId kSystemTenantId; - explicit TenantId(const OID& oid) : _oid(oid), _idStr(oid.toString()) {} + explicit TenantId(const OID& oid) : _oid(oid) {} TenantId() = delete; - const std::string& toString() const { - return _idStr; + std::string toString() const { + return _oid.toString(); } /** @@ -105,7 +105,6 @@ public: private: OID _oid; - std::string _idStr; }; inline bool operator==(const TenantId& lhs, const TenantId& rhs) { |