v.1.1.54276New Feature
Synchronous INSERT in Distributed Tables Enabled by insert_distributed_sync=1
INSERT can be performed synchronously in a Distributed table: OK is returned only after all the data is saved on all the shards. This is activated by the setting insert_distributed_sync=1.
Why it matters
This feature was created to provide stronger consistency guarantees when inserting data into Distributed tables. It solves the problem of asynchronous inserts where the data might not be immediately available on all shards, thus helping users who need confirmation that data is fully persisted across all shards before proceeding. This ensures more predictable and reliable data insertion behavior in distributed environments.How to use it
Enable synchronous INSERT by settinginsert_distributed_sync=1 in your session or server configuration. Once enabled, all INSERT operations on Distributed tables will wait until the data is fully saved on all underlying shards before returning OK.Example:
SET insert_distributed_sync = 1;
INSERT INTO distributed_table <code>VALUES</code> (...);