Commit ca1d9fb 1 parent be48b2d commit ca1d9fb Copy full SHA for ca1d9fb
File tree 3 files changed +3
-7
lines changed
3 files changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -44,8 +44,6 @@ const (
44
44
retryTimeout = 3 * time .Second
45
45
46
46
defaultMaxRetry = 3
47
-
48
- dbTimeout = 30 * time .Second
49
47
)
50
48
51
49
// MySQLConnectParam records the parameters needed to connect to a MySQL database.
@@ -76,8 +74,6 @@ func (param *MySQLConnectParam) ToDriverConfig() *mysql.Config {
76
74
cfg .Params ["charset" ] = "utf8mb4"
77
75
cfg .Params ["sql_mode" ] = fmt .Sprintf ("'%s'" , param .SQLMode )
78
76
cfg .MaxAllowedPacket = int (param .MaxAllowedPacket )
79
- cfg .ReadTimeout = dbTimeout
80
- cfg .WriteTimeout = dbTimeout
81
77
82
78
cfg .TLS = param .TLSConfig
83
79
cfg .AllowFallbackToPlaintext = param .AllowFallbackToPlaintext
Original file line number Diff line number Diff line change @@ -764,7 +764,7 @@ func TestLoadConfig(t *testing.T) {
764
764
err = taskCfg .Adjust (context .Background ())
765
765
require .NoError (t , err )
766
766
equivalentDSN := taskCfg .Checkpoint .MySQLParam .ToDriverConfig ().FormatDSN ()
767
- expectedDSN := "guest:12345@tcp(172.16.30.11:4001)/?readTimeout=30s&writeTimeout=30s& maxAllowedPacket=67108864&charset=utf8mb4&sql_mode=%27ONLY_FULL_GROUP_BY%2CSTRICT_TRANS_TABLES%2CNO_ZERO_IN_DATE%2CNO_ZERO_DATE%2CERROR_FOR_DIVISION_BY_ZERO%2CNO_AUTO_CREATE_USER%2CNO_ENGINE_SUBSTITUTION%27"
767
+ expectedDSN := "guest:12345@tcp(172.16.30.11:4001)/?maxAllowedPacket=67108864&charset=utf8mb4&sql_mode=%27ONLY_FULL_GROUP_BY%2CSTRICT_TRANS_TABLES%2CNO_ZERO_IN_DATE%2CNO_ZERO_DATE%2CERROR_FOR_DIVISION_BY_ZERO%2CNO_AUTO_CREATE_USER%2CNO_ENGINE_SUBSTITUTION%27"
768
768
require .Equal (t , expectedDSN , equivalentDSN )
769
769
770
770
result := taskCfg .String ()
Original file line number Diff line number Diff line change @@ -41,8 +41,8 @@ const (
41
41
42
42
var (
43
43
DefaultGrpcKeepaliveParams = grpc .WithKeepaliveParams (keepalive.ClientParameters {
44
- Time : 10 * time .Second ,
45
- Timeout : 20 * time .Second ,
44
+ Time : 1 * time .Minute ,
45
+ Timeout : 2 * time .Minute ,
46
46
PermitWithoutStream : false ,
47
47
})
48
48
)
You can’t perform that action at this time.
0 commit comments