Deadlock on executing special kind of query

Open
#396 4 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

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

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.

Description

bug documentation native-protocol queries

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.

Dominant language
C
Stars
388
Forks
220
Avg merge
1d 25m
Merged PRs (30d)
16

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ClickHouse/clickhouse-cpp

All issues in ClickHouse/clickhouse-cpp

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.