Placement is always specified as a string

Project: http://git-wip-us.apache.org/repos/asf/couchdb-mem3/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-mem3/commit/c37c9a70
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-mem3/tree/c37c9a70
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-mem3/diff/c37c9a70

Branch: refs/heads/import
Commit: c37c9a70dae6cd6030e985e985945ce6f4a29137
Parents: 255f33d
Author: Robert Newson <robert.new...@cloudant.com>
Authored: Thu Sep 27 23:47:49 2012 +0100
Committer: Robert Newson <robert.new...@cloudant.com>
Committed: Thu Sep 27 23:47:49 2012 +0100

----------------------------------------------------------------------
 src/mem3.erl | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-mem3/blob/c37c9a70/src/mem3.erl
----------------------------------------------------------------------
diff --git a/src/mem3.erl b/src/mem3.erl
index 044dbec..86a3a4b 100644
--- a/src/mem3.erl
+++ b/src/mem3.erl
@@ -163,8 +163,6 @@ choose_shards(DbName, Nodes, Options) ->
     RotatedNodes = B ++ A,
     mem3_util:create_partition_map(DbName, N, Q, RotatedNodes, Suffix).
 
-%% either directly as [{term(), non_neg_integer()}] or
-%% a config setting as "a:2,b:1"
 get_placement(Options) ->
     case couch_util:get_value(placement, Options) of
         undefined ->
@@ -174,8 +172,8 @@ get_placement(Options) ->
                 PlacementStr ->
                     decode_placement_string(PlacementStr)
             end;
-        Placement ->
-            Placement
+        PlacementStr ->
+            decode_placement_string(PlacementStr)
     end.
 
 decode_placement_string(PlacementStr) ->

Reply via email to