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

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

Open
chernser opened this issue Apr 24, 2024 · 0 comments
Open
Labels

Comments

@chernser
Copy link
Contributor

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.

@chernser chernser added the bug label Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant