fix rados disk with empty path

Signed-off-by: Duc Canh Le <duccanh.le@ahrefs.com>
This commit is contained in:
Duc Canh Le 2024-08-30 08:14:06 +00:00
parent 623dc3244a
commit 65ca71bb3b
5 changed files with 5 additions and 2 deletions

View File

@ -324,7 +324,7 @@ std::unique_ptr<IObjectStorage> RadosObjectStorage::cloneObjectStorage(
ObjectStorageKey RadosObjectStorage::generateObjectKeyForPath(const std::string & /*path*/, const std::optional<std::string> & /*key_prefix*/) const ObjectStorageKey RadosObjectStorage::generateObjectKeyForPath(const std::string & /*path*/, const std::optional<std::string> & /*key_prefix*/) const
{ {
constexpr size_t key_name_total_size = 32; constexpr size_t key_name_total_size = 32;
return ObjectStorageKey::createAsRelative(getRandomASCIIString(key_name_total_size)); return ObjectStorageKey::createAsRelative(endpoint.path, getRandomASCIIString(key_name_total_size));
} }
std::unique_ptr<ReadBufferFromFileBase> RadosObjectStorage::readObjectsImpl( /// NOLINT std::unique_ptr<ReadBufferFromFileBase> RadosObjectStorage::readObjectsImpl( /// NOLINT

View File

@ -7,6 +7,7 @@
<user>admin</user> <user>admin</user>
<pool>clickhouse</pool> <pool>clickhouse</pool>
<namespace>integration_test</namespace> <namespace>integration_test</namespace>
<path>integration_test</path>
<options> <options>
<mon_host>ceph1:3300</mon_host> <mon_host>ceph1:3300</mon_host>
<key>AQBbAI1miwfiCRAAySWvPQPgLjjA3EsRJEcBSw==</key> <key>AQBbAI1miwfiCRAAySWvPQPgLjjA3EsRJEcBSw==</key>

View File

@ -8,6 +8,7 @@
<user>admin</user> <user>admin</user>
<pool>clickhouse</pool> <pool>clickhouse</pool>
<namespace>integration_test</namespace> <namespace>integration_test</namespace>
<path>integration_test</path>
<options> <options>
<mon_host>ceph1:3300</mon_host> <mon_host>ceph1:3300</mon_host>
<key>AQBbAI1miwfiCRAAySWvPQPgLjjA3EsRJEcBSw==</key> <key>AQBbAI1miwfiCRAAySWvPQPgLjjA3EsRJEcBSw==</key>

View File

@ -31,7 +31,7 @@ rados_disk_def = """disk(
user='admin', user='admin',
pool='clickhouse', pool='clickhouse',
namespace='integration_test', namespace='integration_test',
path={}, path='integration_test/{}',
options.mon_host='ceph1:3300', options.mon_host='ceph1:3300',
options.key='AQBbAI1miwfiCRAAySWvPQPgLjjA3EsRJEcBSw==', options.key='AQBbAI1miwfiCRAAySWvPQPgLjjA3EsRJEcBSw==',
options.osd_max_object_size='6291456', options.osd_max_object_size='6291456',

View File

@ -7,6 +7,7 @@
<user>admin</user> <user>admin</user>
<pool>clickhouse</pool> <pool>clickhouse</pool>
<namespace>integration_test</namespace> <namespace>integration_test</namespace>
<path>integration_test</path>
<options> <options>
<mon_host>ceph1:3300</mon_host> <mon_host>ceph1:3300</mon_host>
<key>AQBbAI1miwfiCRAAySWvPQPgLjjA3EsRJEcBSw==</key> <key>AQBbAI1miwfiCRAAySWvPQPgLjjA3EsRJEcBSw==</key>