Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clickhouse-backup failing on Atomic engine clickhouse 22.5.1.2079 #466

Closed
olexiyb opened this issue Jul 7, 2022 · 2 comments · Fixed by #479
Closed

clickhouse-backup failing on Atomic engine clickhouse 22.5.1.2079 #466

olexiyb opened this issue Jul 7, 2022 · 2 comments · Fixed by #479
Assignees
Milestone

Comments

@olexiyb
Copy link

olexiyb commented Jul 7, 2022

Clickhouse Version is: 22.5.1.2079
clickhouse-backup Version: 1.4.7

$ clickhouse-backup restore --rm chi-clickhouse-cluster1-0-0-full-2022-07-07-00-00-04
...
2022/07/07 09:13:16.261365  info CREATE TABLE dfp_data.gm_rejected_ads_raw UUID '464470ca-10e1-4ffd-8438-c58e768ce357' (`est_datetime` DateTime('America/New_York'), `account_id` UInt64, `created_ads` UInt64, `rejected_ads` UInt64, `ack_time` DateTime DEFAULT toDateTime(0)) ENGINE = ReplicatedReplacingMergeTree('/clickhouse/tables/{uuid}/{shard}', '{replica}', ack_time) PARTITION BY toYYYYMM(est_datetime) ORDER BY (est_datetime, account_id) SETTINGS index_granularity = 8192
2022/07/07 09:13:16.263254 error can't create table `dfp_data`.`gm_rejected_ads_raw`: code: 62, message: Macro 'uuid' and empty arguments of ReplicatedMergeTree are supported only for ON CLUSTER queries with Atomic database engine after 60 times, please check your schema dependencies

Backup is failing on recently created tables after we upgraded clickhouse from 21.3.13.9 -> 22.5.1.2079

This is example of table definition for older table

{
        "table": "platform_ad_country_data_raw",
        "database": "dfp_data",
        "parts": {
                "default": [
                        {
                                "name": "202204_0_128900_5935"
                        },
                        {
                                "name": "202205_0_275818_11414"
                        },
                        {
                                "name": "202206_0_299610_13991"
                        },
                        {
                                "name": "202207_0_61714_14212"
                        }
                ]
        },
        "query": "CREATE TABLE dfp_data.platform_ad_country_data_raw UUID 'b6344473-a467-43f4-9825-501d3f7610ee' (`platform` Enum8('facebook' = 1, 'taboola' = 2, 'twitter' = 3, 'gemini' = 4, 'outbrain' = 5, 'revcontent' = 6) DEFAULT 'facebook', `country` FixedString(2), `est_datetime` DateTime, `account_id` UInt64, `ad_id` UInt64, `ad_name` String, `clicks` UInt32 DEFAULT 0, `impressions` UInt32 DEFAULT 0, `conversions` UInt32 DEFAULT 0, `spend` Decimal(18, 8), `spend_usd` Decimal(18, 8), `ack_time` DateTime) ENGINE = ReplicatedReplacingMergeTree('/clickhouse/tables/b6344473-a467-43f4-9825-501d3f7610ee/{shard}', '{replica}', ack_time) PARTITION BY toYYYYMM(est_datetime) ORDER BY (platform, ad_id, country, est_datetime) SETTINGS index_granularity = 8192",
        "size": {
                "default": 85602088
        },
        "total_bytes": 85596137,
        "metadata_only": false
}

And this is newer table

{
        "table": "gm_rejected_ads_raw",
        "database": "dfp_data",
        "parts": {
                "default": [
                        {
                                "name": "202206_0_26_9"
                        },
                        {
                                "name": "202207_0_4_3"
                        }
                ]
        },
        "query": "CREATE TABLE dfp_data.gm_rejected_ads_raw UUID '464470ca-10e1-4ffd-8438-c58e768ce357' (`est_datetime` DateTime('America/New_York'), `account_id` UInt64, `created_ads` UInt64, `rejected_ads` UInt64, `ack_time` DateTime DEFAULT toDateTime(0)) ENGINE = ReplicatedReplacingMergeTree('/clickhouse/tables/{uuid}/{shard}', '{replica}', ack_time) PARTITION BY toYYYYMM(est_datetime) ORDER BY (est_datetime, account_id) SETTINGS index_granularity = 8192",
        "size": {
                "default": 3677
        },
        "total_bytes": 2797,
        "metadata_only": false
}

In new table we do not have uuid expanded

image

I suspect something was changed in 22.5.1 version and clickhouse-backup does not support new version

@olexiyb olexiyb changed the title clcikhouse-backup failing on Atomic engine clickhouse 22.5.1.2079 clickhouse-backup failing on Atomic engine clickhouse 22.5.1.2079 Jul 15, 2022
@Slach
Copy link
Collaborator

Slach commented Jul 19, 2022

Is source server where created backup you try to restore created in 21.3 or in 22.5?

@Slach Slach self-assigned this Jul 19, 2022
@Slach Slach added this to the 1.4.8 milestone Jul 19, 2022
@olexiyb
Copy link
Author

olexiyb commented Jul 21, 2022

Is source server where created backup you try to restore created in 21.3 or in 22.5?

source server was a new created as 22.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants