Skip to content

Commit

Permalink
update: enable create volume with 2 replicaNum
Browse files Browse the repository at this point in the history
Signed-off-by: leonrayang <[email protected]>
  • Loading branch information
leonrayang committed Aug 10, 2022
1 parent c9e7751 commit 925a32e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions master/api_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -1212,8 +1212,8 @@ func (m *Server) checkCreateReq(req *createVolReq) (err error) {
req.dpReplicaNum = defaultReplicaNum
}

if req.dpReplicaNum != 1 && req.dpReplicaNum != 3 {
return fmt.Errorf("hot vol's replicaNum can only be 1 or 3, received replicaNum is[%v]", req.dpReplicaNum)
if req.dpReplicaNum > 3 {
return fmt.Errorf("hot vol's replicaNum should be 1 to 3, received replicaNum is[%v]", req.dpReplicaNum)
}
return nil
} else if proto.IsCold(req.volType) {
Expand Down

0 comments on commit 925a32e

Please sign in to comment.