You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ch...@apache.org on 2021/06/17 18:52:46 UTC

[couchdb] 03/03: Fix dreyfus_rpc db shard creation

This is an automated email from the ASF dual-hosted git repository.

chewbranca pushed a commit to branch 3631-3.x-fix-pq-shard-creation
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit 6e4a3b0439cdb33296996ae5f5f2d1dec9e1a5de
Author: Russell Branca <ch...@apache.org>
AuthorDate: Thu Jun 17 11:37:23 2021 -0700

    Fix dreyfus_rpc db shard creation
---
 src/dreyfus/src/dreyfus_rpc.erl | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/dreyfus/src/dreyfus_rpc.erl b/src/dreyfus/src/dreyfus_rpc.erl
index 5542bd0..fe17e7d 100644
--- a/src/dreyfus/src/dreyfus_rpc.erl
+++ b/src/dreyfus/src/dreyfus_rpc.erl
@@ -102,10 +102,12 @@ disk_size(DbName, DDoc, IndexName) ->
     end.
 
 get_or_create_db(DbName, Options) ->
+    DbOpts = mem3_shards:opts_for_db(DbName),
+    Options1 = mem3_util:merge_opts(DbOpts, Options),
     case couch_db:open_int(DbName, Options) of
     {not_found, no_db_file} ->
         couch_log:warning("~p creating ~s", [?MODULE, DbName]),
-        couch_server:create(DbName, Options);
+        couch_server:create(DbName, Options1);
     Else ->
         Else
     end.