Automatic reconnect ignores settings applied for the connection

Open
#371 1 comment 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
databases

Research direction

Start with Client::Impl::RetryGuard and Client::Impl to trace how automatic connection resets occur before the current client query. Determine how connection settings such as SET mutations_sync=2 are retained and reapplied after reconnect. Done means the settings are restored before the query continues, including the ALTER TABLE scenario described.

Written by the indexing model from the issue text.

Description

bug connectivity

Client::Impl::RetryGuard performs automatic connection resets so the application code doesn't have a chance to restore expected connection settings applied before executing the current request.

For example, SET mutations_sync=2, automatic reconnect, ALTER TABLE sequence causes mutations to be executed asynchronously when the application assumes synchronous execution of the mutation.

It looks like connection settings should be stored in the Client::Impl and they should be re-applied in case of such reconnect before executing the client query.

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.