mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Merge pull request #15091 from serathius/linearizability-stop-proxy
tests: Move stopping proxy to after process stop to speed up cluster …
This commit is contained in:
commit
715a0047fa
@ -190,6 +190,14 @@ func (ep *EtcdServerProcess) Stop() (err error) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
ep.cfg.lg.Info("stopped server.", zap.String("name", ep.cfg.Name))
|
ep.cfg.lg.Info("stopped server.", zap.String("name", ep.cfg.Name))
|
||||||
|
if ep.proxy != nil {
|
||||||
|
ep.cfg.lg.Info("stopping proxy...", zap.String("name", ep.cfg.Name))
|
||||||
|
err := ep.proxy.Close()
|
||||||
|
ep.proxy = nil
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -198,14 +206,6 @@ func (ep *EtcdServerProcess) Close() error {
|
|||||||
if err := ep.Stop(); err != nil {
|
if err := ep.Stop(); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if ep.proxy != nil {
|
|
||||||
ep.cfg.lg.Info("closing proxy...", zap.String("name", ep.cfg.Name))
|
|
||||||
err := ep.proxy.Close()
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
ep.proxy = nil
|
|
||||||
}
|
|
||||||
|
|
||||||
if !ep.cfg.KeepDataDir {
|
if !ep.cfg.KeepDataDir {
|
||||||
ep.cfg.lg.Info("removing directory", zap.String("data-dir", ep.cfg.DataDirPath))
|
ep.cfg.lg.Info("removing directory", zap.String("data-dir", ep.cfg.DataDirPath))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user