Skip to content

[Client] Worker thread doesn't catch all exceptions and fails silently  #1619

Description

@chernser

Describe the bug

Precondition: async option is enabled.
When request is executed there is a worker thread that calls actual client and sends out data while calling thread returns with future to an application code (see com.clickhouse.client.AbstractClient#execute).

Here is worker function:

 return CompletableFuture.supplyAsync(() -> {
                try {
                    return sendAsync(sealedRequest, args);
                } catch (ClickHouseException | IOException e) {
                    throw new CompletionException(ClickHouseException.of(e, sealedRequest.getServer()));
                }
            }, getExecutor());

If any RuntimeException that is not derived from ClickHouseException or IOException (for example IllegalArgumentException) than it will not cause Future to fail.

Activity

  1. github-actions commented on Jan 10, 2026

    @github-actions

    This issue has been automatically marked as stale because it has not had activity in the last year. It will be closed in 30 days if no further activity occurs. Please feel free to leave a comment if you believe the issue is still relevant. Thank you for your contributions!

  2. github-actions commented on Feb 9, 2026

    @github-actions

    This issue has been automatically closed because it has not had any further activity in the last 30 days. Thank you for your contributions!

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions