diff --git a/go/cmd/dolt/commands/sqlserver/server_test.go b/go/cmd/dolt/commands/sqlserver/server_test.go index b6fe44f65d6..66e035eb92d 100644 --- a/go/cmd/dolt/commands/sqlserver/server_test.go +++ b/go/cmd/dolt/commands/sqlserver/server_test.go @@ -566,6 +566,8 @@ func TestGenerateYamlConfig(t *testing.T) { # disable_client_multi_statements: false # dolt_transaction_commit: false # event_scheduler: "OFF" + # auto_gc_behavior: + # enable: false listener: # host: localhost diff --git a/go/cmd/dolt/commands/sqlserver/sqlserver.go b/go/cmd/dolt/commands/sqlserver/sqlserver.go index 2dff0326cfb..9bd01af78d0 100644 --- a/go/cmd/dolt/commands/sqlserver/sqlserver.go +++ b/go/cmd/dolt/commands/sqlserver/sqlserver.go @@ -97,6 +97,8 @@ SUPPORTED CONFIG FILE FIELDS: {{.EmphasisLeft}}behavior.dolt_transaction_commit{{.EmphasisRight}}: If true all SQL transaction commits will automatically create a Dolt commit, with a generated commit message. This is useful when a system working with Dolt wants to create versioned data, but doesn't want to directly use Dolt features such as dolt_commit(). +{{.EmphasisLeft}}behavior.auto_gc_behavior.enabled{{.EmphasisRight}}: If true, garbage collection will run automatically in the background. + {{.EmphasisLeft}}listener.host{{.EmphasisRight}}: The host address that the server will run on. This may be {{.EmphasisLeft}}localhost{{.EmphasisRight}} or an IPv4 or IPv6 address {{.EmphasisLeft}}listener.port{{.EmphasisRight}}: The port that the server should listen on diff --git a/go/libraries/doltcore/servercfg/yaml_config.go b/go/libraries/doltcore/servercfg/yaml_config.go index e6488266dfa..edf574767af 100644 --- a/go/libraries/doltcore/servercfg/yaml_config.go +++ b/go/libraries/doltcore/servercfg/yaml_config.go @@ -474,6 +474,9 @@ func (cfg YAMLConfig) withDefaultsFilledIn() YAMLConfig { if withDefaults.BehaviorConfig.DoltTransactionCommit == nil { withDefaults.BehaviorConfig.DoltTransactionCommit = defaults.BehaviorConfig.DoltTransactionCommit } + if withDefaults.BehaviorConfig.AutoGCBehavior == nil { + withDefaults.BehaviorConfig.AutoGCBehavior = defaults.BehaviorConfig.AutoGCBehavior + } if withDefaults.ListenerConfig.HostStr == nil { withDefaults.ListenerConfig.HostStr = defaults.ListenerConfig.HostStr