Java client-v2 server settings does not work for wait_for_async_insert
Description
When using the clickhouse client for insert and setting the serverSetting for wait_for_async_insert does not get set. I have set the server setting as below
InsertSettings insertSettings = new InsertSettings();
insertSettings.serverSetting(ServerSettings.ASYNC_INSERT, "1")
insertSettings.serverSetting(ServerSettings.WAIT_ASYNC_INSERT, "1")
client.insert(table,records, insertSettings)
after the client has inserted the data I go and check query log
SELECT *
FROM system.query_log
WHERE (type = 'QueryFinish') AND (query ILIKE 'INSERT%')
ORDER BY event_time DESC
LIMIT 10;
Settings: {'connect_timeout_with_failover_ms':'1000','load_balancing':'nearest_hostname','distributed_aggregation_memory_efficient':'1','do_not_merge_across_partitions_select_final':'1','os_thread_priority':'2','log_queries':'1','prefer_localhost_replica':'0','parallel_view_processing':'1','async_insert':'1'}
Expected Behaviour
The settings output should contain wait_for_async_insert and my client should wait for data parts to be created and records visible in the table count as soon as client has seen the acknowledgement
Environment
- Client version: client-v2: 0.9.0
ClickHouse Server
- ClickHouse Server version: 25.6.4.12
Thank you for reporting, @aadhikary ! We will look into it.
Looks like a ClickHouse server issue:
- Client sends all server settings
Were you able to reproduce it? I managed to get the client to wait after setting this "distributed_foreground_insert = 1". This is with the cluster where shards are replicating.
Good day, @aadhikary !
Thank you for the information! Can you reproduce it on other client by a chance?