-
Notifications
You must be signed in to change notification settings - Fork 8.3k
database ENGINE = Replicated ZK path #38927
Copy link
Copy link
Closed
Labels
Description
I have a macro {cluster} and I use it to store many environments (stage/prod) in the same one ZK.
select getMacro('cluster');
┌─getMacro('cluster')─┐
│ oCHDWcsp1 │
└─────────────────────┘
set allow_experimental_database_replicated=1;
CREATE DATABASE testdb ENGINE = Replicated('/clickhouse/{cluster}', '1', 'r1');
Received exception from server (version 22.3.7):
Code: 999. DB::Exception: Received from localhost:9000.
DB::Exception: Can't get data for node /clickhouse/oCHDWcsp1/max_log_ptr: node doesn't exist (No node). (KEEPER_EXCEPTION)Another issue if you use tables
CREATE DATABASE testdb ENGINE = Replicated('/clickhouse/oCHDWcsp1/tables', '1', 'r1');
Received exception from server (version 22.3.7):
Code: 999. DB::Exception: Received from localhost:9000. DB::Exception:
Can't get data for node /clickhouse/oCHDWcsp1/tables/max_log_ptr: node doesn't exist (No node). (KEEPER_EXCEPTION)It was fun experience, I spent 5 minutes to find a way to create my first ENGINE = Replicated database.
Reactions are currently unavailable