v.21.1Improvements
Asynchronous INSERTs to Distributed Tables: New fsync Settings Added
Asynchronous INSERTs toDistributedtables: Two new settings (by analogy with MergeTree family) has been added: -fsync_after_insert- Do fsync for every inserted. Will decreases performance of inserts. -fsync_directories- Do fsync for temporary directory (that is used for async INSERT only) after all operations (writes, renames, etc.). #18864 (Azat Khuzhin).
Why it matters
This feature introduces two new settings,fsync_after_insert and fsync_directories, to improve data durability guarantees for asynchronous INSERT operations on Distributed tables. It addresses the need for better control over file synchronization to prevent data loss, at the cost of some insert performance.How to use it
Users can enable and configure asynchronous INSERTfsync behavior by setting the following options in their client or server configuration:-
fsync_after_insert: Enforces fsync after every insert operation.-
fsync_directories: Performs fsync for temporary directories used exclusively for async INSERTs after all writes and file operations.These settings can be adjusted according to the desired balance between insert performance and data durability.