v.21.6Improvement
Flush Buffer Tables Before Database Shutdown to Prevent Data Loss
FlushBuffertables before shutting down tables (within one database), to avoid discarding blocks due to underlying table had been already detached (andDestination table default.a_data_01870 doesn't exist. Block of data is discardederror in the log). #24067 (Azat Khuzhin).
Why it matters
This feature addresses the issue where blocks of data are discarded due to the underlying destination table being detached before theBuffer table is flushed, resulting in errors such as Destination table default.a_data_01870 doesn't exist. Block of data is discarded. By ensuring flushes occur before shutdown, data integrity is maintained and log errors are avoided.How to use it
The flushing ofBuffer tables before table shutdown is performed automatically by ClickHouse during the shutdown process of tables within the same database. No additional user configuration is required.