summaryrefslogtreecommitdiff
path: root/src/mongo/db/tenant_id.h
diff options
context:
space:
mode:
authorjannaerin <golden.janna@gmail.com>2022-06-14 14:57:45 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-06-14 16:36:58 +0000
commit66566c2abd31219d8ace67b4dce19621e49bf8ce (patch)
tree8973fb18da828ae66d6cdb08ff7cd4f8402e3c96 /src/mongo/db/tenant_id.h
parente7f4004be036eb1e009d54b913cebb140d6182c1 (diff)
downloadmongo-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.h7
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) {