Use IDisk to store metadata files in Databases#72027
Use IDisk to store metadata files in Databases#72027tuanpach merged 36 commits intoClickHouse:masterfrom
Conversation
|
This is an automated comment for commit 1544e63 with description of existing statuses. It's updated for the latest CI running ✅ Click here to open a full report in a separate page Successful checks
|
f6f709f to
f2e031f
Compare
c86239c to
6de433c
Compare
6de433c to
1e15cc5
Compare
a3cc772 to
3a82b5e
Compare
2) Not use db_disk when setting up tmp path
c99ad9a to
3445789
Compare
508b48a to
4dd5b04
Compare
|
Hi @kssenii There was a failed test. It was caused by reading cached mmap data with I fixed it by setting the read method to |
| os.path.join(CONFIG_DIR, "storage_conf.xml"), | ||
| "/etc/clickhouse-server/config.d/storage_conf.xml", | ||
| ) | ||
| node.start_clickhouse() |
There was a problem hiding this comment.
Why this is required? I guess because now all disks will be initialized anyway?
There was a problem hiding this comment.
We start the cluster without the storage config first. So that we can start the s3 cluster start_s3_mock(cluster, "broken_s3", "8083"). If we add storage_conf.xml config first, the s3 cluster has not started, and the disk cannot be initialized at the beginning, so the cluster is unable to start.
|
@tuanpach it will be nice to have a test for this |
We use a |
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Allow to use a configurable disk to store metadata files of databases and tables. The disk name can be set via
database_disk.diskconfig parameterCurrently, we use
std::filesystemto store metadata files in databases on the local disk. If local files do not persist after the instance restarts (or scale in/out), the metadata files will be lost.This PR is to replace
std::filesystemwithIDisk. Although the metadata files are still on the local disk withDiskLocal, we can store them in other remote disks (e.g.DiskObjectStorage) if needed. So that the metadata files can be fetched after the instance restarts.Documentation entry for user-facing changes
CI Settings (Only check the boxes if you know what you are doing):