davisp commented on a change in pull request #1789: New Feature: Database 
Partitions
URL: https://github.com/apache/couchdb/pull/1789#discussion_r242681142
 
 

 ##########
 File path: src/mango/src/mango_idx.erl
 ##########
 @@ -329,6 +339,87 @@ gen_name(Idx, Opts0) ->
     mango_util:enc_hex(Sha).
 
 
+get_idx_partitioned(Opts) ->
+    case proplists:get_value(partitioned, Opts) of
+        B when is_boolean(B) ->
+            B;
+        default ->
+            undefined
 
 Review comment:
   The ternary logic is due to the "when unspecified it defaults to whatever 
the database is configured to use" which isn't plumbed through everywhere. It 
certainly adds a bit of complexity to the implementation although from the 
user's perspective it makes the most sense. If you create a partitioned 
database, one would expect to have partitioned indexes by default as that's the 
point of partitioning in the first place.
   
   However, we also allow for non-partitioned (or global) indexes on 
partitioned databases as well as reject attempts to create partitioned indexes 
on non-partitioned databases.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to