Skip to content

Commit

Permalink
Update etcdserver/api/membership/cluster.go
Browse files Browse the repository at this point in the history
Co-authored-by: Benjamin Wang <benjamin.wang@broadcom.com>
  • Loading branch information
siyuanfoundation and ahrtr authored Feb 14, 2024
1 parent e5e032a commit a18a80c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion etcdserver/api/membership/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -814,7 +814,10 @@ func detectDowngrade(cv *semver.Version, nextClusterVersionCompatible bool) erro
if !lv.LessThan(*cv) {
return nil
}
// allow 3.4 server to join 3.5 cluster version, since the data is compatible after `etcdutil migrate` the data_dir.
// allow 3.4 server to join 3.5 cluster. Note the local data schema will
// be automatically migrated to 3.4 if `--next-cluster-version-compatible`
// is enabled (true). Users can also execute `etcdutl migrate` to migrate
// the data before starting the server.
oneMinorVersionDown := &semver.Version{Major: cv.Major, Minor: cv.Minor - 1}
if !nextClusterVersionCompatible || !lv.Equal(*oneMinorVersionDown) {
return fmt.Errorf("invalid downgrade; (current version: %s is lower than determined cluster version: %s).", version.Version, version.Cluster(cv.String()))
Expand Down

0 comments on commit a18a80c

Please sign in to comment.