Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release-19.0] Use default schema reload config values when config file is empty (#16393) #16410

Merged
merged 1 commit into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions go/vt/vttablet/tabletserver/tabletenv/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -414,8 +414,6 @@ func (cfg *TabletConfig) UnmarshalJSON(data []byte) (err error) {
if err != nil {
return err
}
} else {
cfg.SchemaReloadInterval = 0
}

if tmp.SignalSchemaChangeReloadInterval != "" {
Expand All @@ -432,8 +430,6 @@ func (cfg *TabletConfig) UnmarshalJSON(data []byte) (err error) {
if err != nil {
return err
}
} else {
cfg.SchemaChangeReloadTimeout = 0
}

return nil
Expand Down
4 changes: 4 additions & 0 deletions go/vt/vttablet/tabletserver/tabletenv/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ func TestConfigParse(t *testing.T) {
MaxInnoDBTrxHistLen: 1000,
MaxMySQLReplLagSecs: 400,
},
SchemaChangeReloadTimeout: 30 * time.Second,
SchemaReloadInterval: 30 * time.Minute,
}

gotBytes, err := yaml2.Marshal(&cfg)
Expand Down Expand Up @@ -91,6 +93,8 @@ replicationTracker: {}
rowStreamer:
maxInnoDBTrxHistLen: 1000
maxMySQLReplLagSecs: 400
schemaChangeReloadTimeout: 30s
schemaReloadIntervalSeconds: 30m0s
txPool: {}
`
assert.Equal(t, wantBytes, string(gotBytes))
Expand Down
Loading