-
Notifications
You must be signed in to change notification settings - Fork 6.2k
server: do not report ["encountered error"] [error=EOF] for TCPConn alive detectors #31063
Copy link
Copy link
Closed
Labels
affects-5.3This bug affects 5.3.x versions.This bug affects 5.3.x versions.affects-5.4This bug affects the 5.4.x(LTS) versions.This bug affects the 5.4.x(LTS) versions.help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.needs-cherry-pick-release-5.4Should cherry pick this PR to release-5.4 branch.Should cherry pick this PR to release-5.4 branch.sig/sql-infraSIG: SQL InfraSIG: SQL Infratype/enhancementThe issue or PR belongs to an enhancement.The issue or PR belongs to an enhancement.
Metadata
Metadata
Assignees
Labels
affects-5.3This bug affects 5.3.x versions.This bug affects 5.3.x versions.affects-5.4This bug affects the 5.4.x(LTS) versions.This bug affects the 5.4.x(LTS) versions.help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.needs-cherry-pick-release-5.4Should cherry pick this PR to release-5.4 branch.Should cherry pick this PR to release-5.4 branch.sig/sql-infraSIG: SQL InfraSIG: SQL Infratype/enhancementThe issue or PR belongs to an enhancement.The issue or PR belongs to an enhancement.
Enhancement
After #27962, TiDB reports the handshake error if the connection is not successfully established, as a trivial bugfix. This change is released with v5.3.0
However, we found that some load balancers use the TCP connection for alive detectives, for example, the GCP and https://asktug.com/t/topic/273508.
We can easily reproduce the following error logs from TiDB:
You can see the following error logs from TiDB:
The although harmless, the logs can be confusing to the users, so I think it's better to change the log level to 'DEBUG' when the
io.EOFerror is encountered:tidb/server/server.go
Line 513 in abb6582
BTW, MySQL reports the following logs for the case above:
So the failed connection logs happened for MySQL, but it is better in
Notelevel.