Skip to content

Commit

Permalink
resolve conflict
Browse files Browse the repository at this point in the history
Signed-off-by: Zheng Xiangsheng <hundundm@gmail.com>
  • Loading branch information
HunDunDM committed Nov 25, 2020
1 parent 57570ca commit 5f16bf4
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions server/cluster/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -907,18 +907,8 @@ func (c *RaftCluster) putStoreImpl(store *metapb.Store, force bool) error {
return errors.Errorf("invalid put store %v", store)
}

<<<<<<< HEAD
v, err := ParseVersion(store.GetVersion())
if err != nil {
return errors.Errorf("invalid put store %v, error: %s", store, err)
}
clusterVersion := *c.opt.GetClusterVersion()
if !IsCompatible(clusterVersion, *v) {
return errors.Errorf("version should compatible with version %s, got %s", clusterVersion, v)
=======
if err := c.checkStoreVersion(store); err != nil {
return err
>>>>>>> 57bfeb79... server: check the store version when changing tombstone status (#3200)
}

// Store address can not be the same as other stores.
Expand Down Expand Up @@ -959,12 +949,12 @@ func (c *RaftCluster) putStoreImpl(store *metapb.Store, force bool) error {
}

func (c *RaftCluster) checkStoreVersion(store *metapb.Store) error {
v, err := versioninfo.ParseVersion(store.GetVersion())
v, err := ParseVersion(store.GetVersion())
if err != nil {
return errors.Errorf("invalid put store %v, error: %s", store, err)
}
clusterVersion := *c.opt.GetClusterVersion()
if !versioninfo.IsCompatible(clusterVersion, *v) {
if !IsCompatible(clusterVersion, *v) {
return errors.Errorf("version should compatible with version %s, got %s", clusterVersion, v)
}
return nil
Expand Down

0 comments on commit 5f16bf4

Please sign in to comment.