ClickHouse / ClickHouse/clickhouse-cpp

Deadlock on executing special kind of query

Open
#396 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
382
Forks
209
Avg merge
2d 19h
Merged PRs (30d)
14

Description

I try to write a loader from TVS format.
So i run the query like

client.Execute("CREATE TEMPORARY TABLE IF NOT EXISTS test_client (id UInt64, name String)");
client.Execute("insert into test_client FORMAT TSV\n");

and got deadlock in
client.Execute("insert into test_client FORMAT TSV\n");

The client waits answer from server - the ServerCodes::EndOfStream code.
The server also waits something. I think it waits some data. What data format is it waiting?
How to send the data that server waiting?

May be it is bug of the clickhouse server.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the deadlock with the two client.Execute calls shown in the issue, then inspect the client and server handling of INSERT queries using FORMAT TSV. Determine what data the server expects after the INSERT statement and verify the behavior with a successful TSV load or a clearly reported error.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
database
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.