Skip to content

Java client-v2 server settings does not work for wait_for_async_insert #2510

@aadhikary

Description

@aadhikary

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions