Permalink
Browse files

Don't try to increase min repl count with insufficient nodes.

Closes #118
  • Loading branch information...
1 parent db43dab commit 36aacf7c8555f1cf6c482becd7fff348f5783cef @dustin dustin committed Nov 2, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 blobs.go
View
@@ -340,6 +340,10 @@ func ensureMinimumReplicaCount() error {
endKey = len(nl) - 1
}
+ if endKey < 1 {
+ return errors.New("Not enough nodes to increase repl count.")
+ }
+
// Find some less replicated docs to suck in.
err = couchbase.ViewCustom("cbfs", "repcounts",
map[string]interface{}{

0 comments on commit 36aacf7

Please sign in to comment.