-
Notifications
You must be signed in to change notification settings - Fork 8.3k
"Directory for table data already exists" after attempt to create replicated table with invalid zk path #14115
Copy link
Copy link
Closed
Labels
bugConfirmed user-visible misbehaviour in official releaseConfirmed user-visible misbehaviour in official releasecomp-replicationReplicatedMergeTree* + replication log/state transitions, eventual consistency mechanics.ReplicatedMergeTree* + replication log/state transitions, eventual consistency mechanics.
Description
Attempt to create replicated table with invalid zk path leads to empty table data dir on file system, and subsequent attempts results to "Directory for table data already exists" errors.
ClickHouse version: 20.6.4
Steps to reproduce
sas-644d9zs4v9adt4ka.db.yandex.net :) create table test (date Date, n UInt32) ENGINE = ReplicatedMergeTree('/{invalid}/table', '{replica}') PARTITION BY date ORDER BY (date, n)
CREATE TABLE test
(
`date` Date,
`n` UInt32
)
ENGINE = ReplicatedMergeTree('/{invalid}/table', '{replica}')
PARTITION BY date
ORDER BY (date, n)
Received exception from server (version 20.6.4):
Code: 62. DB::Exception: Received from localhost:9001. DB::Exception: No macro 'invalid' in config while processing substitutions in '/{invalid}/table' at 2.
0 rows in set. Elapsed: 0.020 sec.
sas-644d9zs4v9adt4ka.db.yandex.net :) create table test (date Date, n UInt32) ENGINE = ReplicatedMergeTree('/table', '{replica}') PARTITION BY date ORDER BY (date, n)
CREATE TABLE test
(
`date` Date,
`n` UInt32
)
ENGINE = ReplicatedMergeTree('/table', '{replica}')
PARTITION BY date
ORDER BY (date, n)
Received exception from server (version 20.6.4):
Code: 57. DB::Exception: Received from localhost:9001. DB::Exception: Directory for table data data/default/test/ already exists.
0 rows in set. Elapsed: 0.011 sec.
Similar issue: #11432
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugConfirmed user-visible misbehaviour in official releaseConfirmed user-visible misbehaviour in official releasecomp-replicationReplicatedMergeTree* + replication log/state transitions, eventual consistency mechanics.ReplicatedMergeTree* + replication log/state transitions, eventual consistency mechanics.