mirror of
https://github.com/plausible/analytics.git
synced 2024-11-22 02:27:57 +03:00
Channels: Run TRUNCATE with alter_sync=2 (#4804)
ON CLUSTER fails since it tries to create conflicting dll entries on each node. Error: ```Cannot execute replicated DDL query, maximum retries exceeded. (UNFINISHED)```
This commit is contained in:
parent
4aa7dec301
commit
fc83040ec1
@ -11,7 +11,7 @@ ENGINE = MergeTree()
|
||||
<% end %>
|
||||
ORDER BY referrer_source;
|
||||
|
||||
TRUNCATE TABLE acquisition_channel_source_category <%= @on_cluster_statement %>;
|
||||
TRUNCATE TABLE acquisition_channel_source_category SETTINGS alter_sync=2;
|
||||
|
||||
INSERT INTO acquisition_channel_source_category(referrer_source, category)
|
||||
SELECT t.1 AS referrer_source, t.2 AS category
|
||||
@ -43,7 +43,7 @@ ENGINE = MergeTree()
|
||||
<% end %>
|
||||
ORDER BY referrer_source;
|
||||
|
||||
TRUNCATE TABLE acquisition_channel_paid_sources <%= @on_cluster_statement %>;
|
||||
TRUNCATE TABLE acquisition_channel_paid_sources SETTINGS alter_sync=2;
|
||||
|
||||
INSERT INTO acquisition_channel_paid_sources(referrer_source)
|
||||
SELECT arrayJoin({paid_sources:Array(String)}) AS referrer_source
|
||||
|
@ -1 +1 @@
|
||||
TRUNCATE TABLE IF EXISTS location_data <%= if @cluster? do %>ON CLUSTER '{cluster}'<% end %>
|
||||
TRUNCATE TABLE IF EXISTS location_data SETTINGS alter_sync=2
|
||||
|
Loading…
Reference in New Issue
Block a user