Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does asynchronous insertion support TCP connections? #54098

Closed
LGDHuaOPER opened this issue Aug 31, 2023 · 3 comments
Closed

Does asynchronous insertion support TCP connections? #54098

LGDHuaOPER opened this issue Aug 31, 2023 · 3 comments

Comments

@LGDHuaOPER
Copy link

I have read doc twice, and I use HTTP successful.
But when I use TCP(9000) to insert data, it does not work, and I can not query any logs in asynchronous_insert_log. What is the reason for this? Does asynchronous insertion support TCP connections?

PS:
I use cpp SDK. ClickHouse version 23.7

Thank you very much!

@LGDHuaOPER LGDHuaOPER added the question Question? label Aug 31, 2023
@cangyin
Copy link
Contributor

cangyin commented Aug 31, 2023

I think TCP supports that, I did some tests with clickhouse-client (TCP interface) on async insert feature, that works.

I advice that do a test query:

SELECT getSetting('async_insert');
SELECT getSetting('async_insert') SETTINGS async_insert = 1;

to check the 'async_insert' setting is enabled in config file or enabled by the insert query.

@den-crane
Copy link
Contributor

den-crane commented Aug 31, 2023

TCP protocol supports async inserts. But it is a special type of insert when data is attached to insert (SQL) text.
Client library should support it.

Please create a feature request here https://github.com/ClickHouse/clickhouse-cpp/issues

@genzgd
Copy link
Contributor

genzgd commented Aug 31, 2023

Correct, async inserts only work over the TCP native protocol if the data is sent as SQL text. If you use a client such as clickhouse-go, clickhouse-driver (Python), or the C++ SDK to manage your native protocol inserts actually using the native data format, async inserts are not available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants