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-v2] Retries on failures #1768

Merged
merged 6 commits into from
Aug 31, 2024
Merged

[client-v2] Retries on failures #1768

merged 6 commits into from
Aug 31, 2024

Conversation

chernser
Copy link
Contributor

@chernser chernser commented Aug 10, 2024

Summary

Closes #1692

Checklist

Delete items not relevant to your PR:

  • Unit and integration tests covering the common scenarios were added
  • A human-readable description of the changes was provided to include in CHANGELOG
  • For significant changes, documentation in https://github.com/ClickHouse/clickhouse-docs was updated with further explanations or tutorials

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
70.6% Coverage on New Code (required ≥ 80%)
4.1% Duplication on New Code (required ≤ 3%)

See analysis details on SonarCloud

@chernser chernser requested review from mzitnik and Paultagoras and removed request for mzitnik and Paultagoras August 28, 2024 05:42
@chernser chernser marked this pull request as ready for review August 28, 2024 06:57
}

if (!userConfig.containsKey("client_network_buffer_size")) {
if (!configuration.containsKey("client_network_buffer_size")) {
setClientNetworkBufferSize(8192);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets add it as const

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done.

throw new ClientException("Failed to get response", e);
}
LOG.warn("Failed to get response. Retrying.", e);
} catch ( NoHttpResponseException | ConnectionRequestTimeoutException | ConnectTimeoutException e) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it a duplicated code? (i see in other inserts as well)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes. I left it as duplicate because handling it in dedicated method would not be much shorter. I will review this code later if it can be extracted to a single method.

@chernser chernser merged commit 12c921d into main Aug 31, 2024
57 of 59 checks passed
@chernser chernser deleted the clientv2_retries branch August 31, 2024 04:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[client-v2] Retries
2 participants