megaease / easeprobe

A simple, standalone, and lightweight tool that can do health/status checking, written in Go.
Apache License 2.0
2.16k stars 228 forks source link

set timeout for kafka client conn #455

Closed suchen-sci closed 10 months ago

suchen-sci commented 10 months ago

Currently, for the Kafka client, the timeout is only applicable during the dialing process. Once the connection is established and conn.ReadPartitions is called, it may experience significant delays. This situation can occur if the Kafka server is unresponsive or slow to write responses, potentially taking several minutes. To address this issue, this pr introduces a timeout setting for the connection.

This may cause the problem in issue #442 .

codecov-commenter commented 10 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (6db5f70) 99.07% compared to head (40d5ed2) 99.07%.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #455 +/- ## ======================================= Coverage 99.07% 99.07% ======================================= Files 85 85 Lines 5842 5842 ======================================= Hits 5788 5788 Misses 40 40 Partials 14 14 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.