Skip to content

Commit

Permalink
cluster: support modify commit_ts and fix default value
Browse files Browse the repository at this point in the history
  • Loading branch information
nexustar committed Dec 16, 2021
1 parent 3523106 commit 26ac529
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion embed/templates/scripts/run_drainer.sh.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ exec bin/drainer \
--data-dir="{{.DataDir}}" \
--log-file="{{.LogDir}}/drainer.log" \
--config=conf/drainer.toml \
--initial-commit-ts="{{.CommitTs}}" 2>> "{{.LogDir}}/drainer_stderr.log"
--initial-commit-ts={{.CommitTs}} 2>> "{{.LogDir}}/drainer_stderr.log"
2 changes: 1 addition & 1 deletion pkg/cluster/spec/drainer.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ type DrainerSpec struct {
DeployDir string `yaml:"deploy_dir,omitempty"`
DataDir string `yaml:"data_dir,omitempty"`
LogDir string `yaml:"log_dir,omitempty"`
CommitTS int64 `yaml:"commit_ts,omitempty"`
CommitTS int64 `yaml:"commit_ts" default:"-1" validate:"commit_ts:editable"`
Offline bool `yaml:"offline,omitempty"`
NumaNode string `yaml:"numa_node,omitempty" validate:"numa_node:editable"`
Config map[string]interface{} `yaml:"config,omitempty" validate:"config:ignore"`
Expand Down

0 comments on commit 26ac529

Please sign in to comment.