Skip to content

Commit

Permalink
MB-39613: Fix build breakage (error snuck in during backport)
Browse files Browse the repository at this point in the history
Change-Id: Id03c4bedaa0ee705c1a2652f88a0547ebcddc900
Reviewed-on: http://review.couchbase.org/c/cbgt/+/130831
Well-Formed: Build Bot <build@couchbase.com>
Tested-by: Abhinav Dangeti <abhinav@couchbase.com>
Reviewed-by: Abhinav Dangeti <abhinav@couchbase.com>
  • Loading branch information
abhinavdangeti committed Jun 18, 2020
1 parent 623cf2f commit 4fdb560
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions manager_api.go
Expand Up @@ -97,17 +97,17 @@ func (mgr *Manager) CreateIndex(sourceType,
// Validate maxReplicasAllowed here.
maxReplicasAllowed, _ := strconv.Atoi(mgr.Options()["maxReplicasAllowed"])
if planParams.NumReplicas < 0 || planParams.NumReplicas > maxReplicasAllowed {
return "", fmt.Errorf("manager_api: CreateIndex failed, maxReplicasAllowed:"+
return fmt.Errorf("manager_api: CreateIndex failed, maxReplicasAllowed:"+
" '%v', but request for '%v'", maxReplicasAllowed, planParams.NumReplicas)
}

nodeDefs, _, err := CfgGetNodeDefs(mgr.cfg, NODE_DEFS_KNOWN)
if err != nil {
return "", fmt.Errorf("manager_api: CreateIndex failed, "+
return fmt.Errorf("manager_api: CreateIndex failed, "+
"CfgGetNodeDefs err: %v", err)
}
if len(nodeDefs.NodeDefs) < planParams.NumReplicas+1 {
return "", fmt.Errorf("manager_api: CreateIndex failed, cluster needs %d "+
return fmt.Errorf("manager_api: CreateIndex failed, cluster needs %d "+
"search nodes to support the requested replica count of %d",
planParams.NumReplicas+1, planParams.NumReplicas)
}
Expand Down

0 comments on commit 4fdb560

Please sign in to comment.