address code review comments
This commit is contained in:
parent
8a7a8d0d59
commit
55972ca07e
|
@ -569,7 +569,7 @@ public:
|
|||
Tenant(fdb::Database* db, BytesRef name, int name_length) : tenant(nullptr) {
|
||||
auto tenant_raw = static_cast<native::FDBTenant*>(nullptr);
|
||||
if (auto err = Error(native::fdb_database_open_tenant(db->db.get(), name.data(), name_length, &tenant_raw))) {
|
||||
throwError(fmt::format("Failed to create tenant with name '{}': ", toCharsRef(name)), err);
|
||||
throwError(fmt::format("Failed to open tenant with name '{}': ", toCharsRef(name)), err);
|
||||
}
|
||||
tenant = std::shared_ptr<native::FDBTenant>(tenant_raw, &native::fdb_tenant_destroy);
|
||||
}
|
||||
|
|
|
@ -437,7 +437,8 @@ int runWorkload(Database db,
|
|||
// and create transactions as needed
|
||||
Tenant* tenants[args.tenants];
|
||||
for (int i = 0; i < args.tenants; ++i) {
|
||||
BytesRef tenant_name = toBytesRef("tenant" + std::to_string(i));
|
||||
std::string tenantStr = "tenant" + std::to_string(i);
|
||||
BytesRef tenant_name = toBytesRef(tenantStr);
|
||||
tenants[i] = new Tenant(&db, tenant_name, tenant_name.length());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue