diff --git a/go/vt/vttablet/tabletserver/tabletenv/config.go b/go/vt/vttablet/tabletserver/tabletenv/config.go index 89f827fa1f3..cf2947f55aa 100644 --- a/go/vt/vttablet/tabletserver/tabletenv/config.go +++ b/go/vt/vttablet/tabletserver/tabletenv/config.go @@ -406,8 +406,6 @@ func (cfg *TabletConfig) UnmarshalJSON(data []byte) (err error) { if err != nil { return err } - } else { - cfg.SchemaReloadInterval = 0 } if tmp.SchemaChangeReloadTimeout != "" { @@ -415,8 +413,6 @@ func (cfg *TabletConfig) UnmarshalJSON(data []byte) (err error) { if err != nil { return err } - } else { - cfg.SchemaChangeReloadTimeout = 0 } return nil diff --git a/go/vt/vttablet/tabletserver/tabletenv/config_test.go b/go/vt/vttablet/tabletserver/tabletenv/config_test.go index a51a3c599e8..d16b6276964 100644 --- a/go/vt/vttablet/tabletserver/tabletenv/config_test.go +++ b/go/vt/vttablet/tabletserver/tabletenv/config_test.go @@ -58,6 +58,8 @@ func TestConfigParse(t *testing.T) { MaxInnoDBTrxHistLen: 1000, MaxMySQLReplLagSecs: 400, }, + SchemaChangeReloadTimeout: 30 * time.Second, + SchemaReloadInterval: 30 * time.Minute, } gotBytes, err := yaml2.Marshal(&cfg) @@ -93,6 +95,8 @@ replicationTracker: {} rowStreamer: maxInnoDBTrxHistLen: 1000 maxMySQLReplLagSecs: 400 +schemaChangeReloadTimeout: 30s +schemaReloadIntervalSeconds: 30m0s txPool: {} ` assert.Equal(t, wantBytes, string(gotBytes))