diff options
author | Robert Newson <rnewson@apache.org> | 2018-08-30 19:37:32 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-30 19:37:32 +0100 |
commit | 32ff5f7cca3f20527fcb5b3aac45062ce45f85a6 (patch) | |
tree | 0896cff4489f719a5ee3c4c19e074e6fc1a4bb46 | |
parent | b2b6988e65af7273ddd8b9223b2236c3d182c779 (diff) | |
parent | cba1a903041cf57e19944f88a64e6d4ef5a60cb0 (diff) | |
download | couchdb-32ff5f7cca3f20527fcb5b3aac45062ce45f85a6.tar.gz |
Merge pull request #1591 from apache/create-shards-if-missing
Create shard files if missing
-rw-r--r-- | src/fabric/src/fabric_util.erl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fabric/src/fabric_util.erl b/src/fabric/src/fabric_util.erl index dd4b80da6..e622c6aa0 100644 --- a/src/fabric/src/fabric_util.erl +++ b/src/fabric/src/fabric_util.erl @@ -179,7 +179,7 @@ get_db(DbName, Options) -> Nodes = [node()|erlang:nodes()], Live = [S || #shard{node = N} = S <- Shards, lists:member(N, Nodes)], Factor = list_to_integer(config:get("fabric", "shard_timeout_factor", "2")), - get_shard(Live, Options, 100, Factor). + get_shard(Live, [{create_if_missing, true} | Options], 100, Factor). get_shard([], _Opts, _Timeout, _Factor) -> erlang:error({internal_server_error, "No DB shards could be opened."}); |