Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
support system variable wait_timeout. (#8245) #8346
What problem does this PR solve?
close client connection when the server waited for a long time , support system variable
What is changed and how it works?
use TCPConn.SetReadDeadline() before readPacket()
changed the title from
WIP: support system variable wait_timeout. (#8245)
[WIP] support system variable wait_timeout. (#8245)
Nov 18, 2018
@hhxcc I just add a simple testcase in integeration repo which will setup a tidbserver and test them via network.
@hhxcc here, maybe we also take care about a not easy question:
now, deadline is set on
so for a corner case: someone make a big data input to tidb-server, then mysql protocol will transfer them in multiple packet, first packet arrive time is
but I think wait_timeout should be "the timeout that no data on the wire", we should close connection only when it's idle, no matter how, read deadline should be set for per unbuffed
at last, we should take care situation that one conn read with deadline and later read without deadline, once deadline be set, later read need be reset new deadline or 0(no timeout) or it will got unexpect timeout error.