-
Notifications
You must be signed in to change notification settings - Fork 726
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
*: upgrade etcd to master #1101
Changes from 5 commits
096f1e9
05e611f
564e7b9
3eb3bec
5b2162f
2a1932f
af05403
052d095
6bcb27a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -73,8 +73,10 @@ func PrepareJoinCluster(cfg *Config) error { | |
} | ||
|
||
// Cases with data directory. | ||
// The path change from "member" to "member/wal" | ||
// Reference: https://github.com/coreos/etcd/pull/9733 | ||
initialCluster := "" | ||
if wal.Exist(path.Join(cfg.DataDir, "member")) { | ||
if wal.Exist(path.Join(cfg.DataDir, "member/wal")) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. oh, it breaks the compatibility? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no, it's compatibility. but better to keep the previous logic. address it. |
||
cfg.InitialCluster = initialCluster | ||
cfg.InitialClusterState = embed.ClusterStateFlagExisting | ||
return nil | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -285,6 +285,16 @@ func (s *Server) Run() error { | |
return nil | ||
} | ||
|
||
// SetUpTestMode for testing | ||
func (s *Server) SetUpTestMode() { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we do it in |
||
// The etcd master version has removed embed.Config.SetupLogging. | ||
// Now logger is set up automatically based on embed.Config.Logger, embed.Config.LogOutputs, embed.Config.Debug fields. | ||
// Use zap logger in the test, otherwise will panic. Reference: https://github.com/coreos/etcd/blob/master/embed/config_logging.go#L45 | ||
s.etcdCfg.Logger = "zap" | ||
s.etcdCfg.LogOutputs = []string{"stdout"} | ||
s.etcdCfg.Debug = false | ||
} | ||
|
||
func (s *Server) bootstrapCluster(req *pdpb.BootstrapRequest) (*pdpb.BootstrapResponse, error) { | ||
clusterID := s.clusterID | ||
|
||
|
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we use zap in production?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
etcd plan to use
zap
replace thecapnslog
logging. and we only enable it in the test.