Skip to content

Commit

Permalink
Merge pull request #16967 from serathius/remove-v2-proposals
Browse files Browse the repository at this point in the history
Remove v2 proposals code
  • Loading branch information
ahrtr authored Nov 21, 2023
2 parents a4426b4 + dd7a4d2 commit ec6147c
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 543 deletions.
42 changes: 0 additions & 42 deletions server/etcdserver/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,6 @@ type ServerV2 interface {
Server
Leader() types.ID

// Do takes a V2 request and attempts to fulfill it, returning a Response.
Do(ctx context.Context, r pb.Request) (Response, error)
ClientCertAuthEnabled() bool
}

Expand Down Expand Up @@ -2267,46 +2265,6 @@ func (s *EtcdServer) monitorCompactHash() {
}
}

func (s *EtcdServer) updateClusterVersionV2(ver string) {
lg := s.Logger()

if s.cluster.Version() == nil {
lg.Info(
"setting up initial cluster version using v2 API",
zap.String("cluster-version", version.Cluster(ver)),
)
} else {
lg.Info(
"updating cluster version using v2 API",
zap.String("from", version.Cluster(s.cluster.Version().String())),
zap.String("to", version.Cluster(ver)),
)
}

req := pb.Request{
Method: "PUT",
Path: membership.StoreClusterVersionKey(),
Val: ver,
}

ctx, cancel := context.WithTimeout(s.ctx, s.Cfg.ReqTimeout())
_, err := s.Do(ctx, req)
cancel()

switch err {
case nil:
lg.Info("cluster version is updated", zap.String("cluster-version", version.Cluster(ver)))
return

case errors.ErrStopped:
lg.Warn("aborting cluster version update; server is stopped", zap.Error(err))
return

default:
lg.Warn("failed to update cluster version", zap.Error(err))
}
}

func (s *EtcdServer) updateClusterVersionV3(ver string) {
lg := s.Logger()

Expand Down
Loading

0 comments on commit ec6147c

Please sign in to comment.