-
Notifications
You must be signed in to change notification settings - Fork 530
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
Use debug logging for internal connection details #1803
Conversation
Good day, @alxhill ! It was expected that:
|
I think the TTL being set to zero should mean unlimited TTL: Lines 435 to 437 in 12f5edf
Our code did used to re-use connections a lot but doesn't as much any more. It's possible testcontainers is the primary culprit - I made a minimal repro that creates a Client and runs the test query and it shows this log-line a ton before it starts executing the tests: @Testcontainers
class DemoTestContainersTest {
@Container
private final ClickHouseContainer clickHouseContainer = new ClickHouseContainer(ClickHouseConstants.IMAGE);
private Client client;
@BeforeEach
void before() {
client = new Client.Builder()
.addEndpoint(
Protocol.HTTP, clickHouseContainer.getHost(), clickHouseContainer.getFirstMappedPort(), false)
.setUsername(clickHouseContainer.getUsername())
.setPassword(clickHouseContainer.getPassword())
.compressServerResponse(true)
.setSocketTimeout(30, ChronoUnit.SECONDS)
.build();
}
@Test
void connected() throws Exception {
System.out.println("starting test query");
try (QueryResponse response =
client.query(clickHouseContainer.getTestQueryString()).join()) {
System.out.println("response: " + response);
}
System.out.println("finished test query");
}
} Output logs here: ch-connection.log |
@alxhill thank you for the test! You seems using old version of the client-v2 (internally it uses old one but now has a new implementation). |
Those logs are using the Separate from fixing up our code, would still encourage switching this logline to |
@alxhill |
Summary
Currently, connection TTL & queue strategy are logged at INFO level for every request. This can result in a lot of noise in logs:
This PR switches them to DEBUG log levels.
Checklist
Delete items not relevant to your PR: