ClickHouse / ClickHouse/ClickHouse

Add dynamic prefix for LocalObjectStorage Key

Open
#62,893 0 comments 0 reactions 0 assignees View on GitHub
comp-object-storage-disks feature
Dominant language
C++
Stars
49.9k
Forks
9k
Avg merge
21h 32m
Merged PRs (30d)
515

Description

> (you don't have to strictly follow this form)

**Use case**
If we use remote object storage based on NFS mount, and wu use disk with object_storage_type eual which type is `local_blob_storage`, all files are placed in the same directory like this:
```
/mnt/test/mettksbhzaawesirsakbmpubwuabqidi
/mnt/test/ksojvmwooqymhvefjcgrnbzbdduzqchj
/mnt/test/orzuglnuzmnhrzzytsgoiymamklbtxpu
...
```

These files have fixed prefixes, metadata of these prefixes may always be allocated on fixed nodes, this is inconvenient for subsequent metadata node expansion.

> A clear and concise description of any alternative solutions or features you've considered.

Add local date and random string for prfix,like this:
```
/mnt/test/2024-04-24/axy/tksbhzaawesirsakbmpubwuabqidi
/mnt/test/2024-04-25/sxo/jvmwooqymhvefjcgrnbzbdduzqchj
/mnt/test/2024-04-26/hgf/uglnuzmnhrzzytsgoiymamklbtxpu
....
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.