Skip to content
This repository has been archived by the owner on Nov 24, 2023. It is now read-only.

Commit

Permalink
master: address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
csuzhangxc committed Nov 13, 2019
1 parent dcda7b2 commit c9a413f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion dm/master/etcd.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@ import (

"go.etcd.io/etcd/clientv3"
"go.etcd.io/etcd/embed"
"go.uber.org/zap"
"google.golang.org/grpc"

"github.com/pingcap/dm/pkg/etcdutil"
"github.com/pingcap/dm/pkg/log"
"github.com/pingcap/dm/pkg/terror"
)

Expand Down Expand Up @@ -74,7 +76,7 @@ func startEtcd(masterCfg *Config,
//
// when setting `initial-cluster` explicitly to bootstrap a new cluster:
// - if local persistent data exist, just restart the previous cluster (in fact, it's not bootstrapping).
// - if local persistent data not exist, just bootstrap the cluster.
// - if local persistent data not exist, just bootstrap the cluster as a new cluster.
//
// when setting `join` to join an existing cluster (without `initial-cluster` set):
// - if local persistent data exists (in fact, it's not join):
Expand Down Expand Up @@ -114,6 +116,7 @@ func prepareJoinEtcd(cfg *Config) error {
} else {
cfg.InitialCluster = strings.TrimSpace(string(s))
cfg.InitialClusterState = embed.ClusterStateFlagExisting
log.L().Info("using persistent join data", zap.String("file", joinFP), zap.String("data", cfg.InitialCluster))
return nil
}

Expand Down

0 comments on commit c9a413f

Please sign in to comment.