You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I conducted a test to verify how the validation-timeout setting works in HikariCP under specific conditions.
Here is my setup:
A Spring Boot application running locally
A MySQL database running locally
A toxiproxy-server running locally, forwarding port 3306 to 3307, and adding a 6000ms latency
I wanted to observe how validation-timeout behaves in this situation. While making normal API calls, I added latency in the middle of the test. As expected, a log message indicating validation failure appeared.
However, based on the code:
final var validationSeconds = (int) Math.max(1000L, validationTimeout) / 1000;
If validation-timeout is set to 2500, the failure log should appear after 2 seconds, but instead, it appears 4 seconds after the API call.
When I set it to 1500, the log appears 2 seconds later.
When I set it to 3500, the log appears 6 seconds later.
From this pattern, it seems that the actual validation-timeout value becomes twice the expected value after dividing by 1000. What could be causing this issue?
Additional Test
I also performed another test where I disabled Wi-Fi after starting the local application to see how it behaves. In this case, it worked as expected.
With validation-timeout set to 2500, the log appeared after approximately 2 seconds.
Could you help me understand why this discrepancy occurs?
Thank you.
The text was updated successfully, but these errors were encountered:
Hello,
I conducted a test to verify how the validation-timeout setting works in HikariCP under specific conditions.
Here is my setup:
A Spring Boot application running locally
A MySQL database running locally
A toxiproxy-server running locally, forwarding port 3306 to 3307, and adding a 6000ms latency
I wanted to observe how validation-timeout behaves in this situation. While making normal API calls, I added latency in the middle of the test. As expected, a log message indicating validation failure appeared.
However, based on the code:
final var validationSeconds = (int) Math.max(1000L, validationTimeout) / 1000;
If validation-timeout is set to 2500, the failure log should appear after 2 seconds, but instead, it appears 4 seconds after the API call.
When I set it to 1500, the log appears 2 seconds later.
When I set it to 3500, the log appears 6 seconds later.
From this pattern, it seems that the actual validation-timeout value becomes twice the expected value after dividing by 1000. What could be causing this issue?
Additional Test
I also performed another test where I disabled Wi-Fi after starting the local application to see how it behaves. In this case, it worked as expected.
With validation-timeout set to 2500, the log appeared after approximately 2 seconds.
Could you help me understand why this discrepancy occurs?
Thank you.
The text was updated successfully, but these errors were encountered: