ethlo / my2ch

Scheduled transfer of full MySQL query results to automatically generated, corresponding Clickhouse tables. Extremely useful for extracting data for analysis through ClickHouse.
Apache License 2.0
2 stars 0 forks source link

Support atomic table swap to avoid failures due to missing table(s) #3

Closed ethlo closed 2 years ago

ethlo commented 2 years ago

By using https://clickhouse.com/docs/en/engines/database-engines/atomic#exchange-tables we can avoid dropping and recreating tables leaving us vulnerable to a race-condition between dropping, and re-creating and filling a table with data.