diff options
author | Adam Kocoloski <adam@cloudant.com> | 2010-05-28 10:48:34 -0400 |
---|---|---|
committer | Adam Kocoloski <adam@cloudant.com> | 2010-05-28 10:48:34 -0400 |
commit | 58ce4b99b19affa3aaf335b6dc257301ef813c69 (patch) | |
tree | 6f431bc6487e075afe5460193ec3e15cf63e985d /src | |
parent | ffb5e5579a443b9c729ad52b8806dc2b83d51588 (diff) |
fix matching of open_doc replies
Diffstat (limited to 'src')
-rw-r--r-- | src/fabric_doc.erl | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/fabric_doc.erl b/src/fabric_doc.erl index c3cc0f47..039b6aab 100644 --- a/src/fabric_doc.erl +++ b/src/fabric_doc.erl @@ -10,12 +10,12 @@ open_doc(DbName, Id, Options) -> SuppressDeletedDoc = not lists:member(deleted, Options), Acc0 = {length(Workers), couch_util:get_value(r, Options, 1), []}, case fabric_util:recv(Workers, #shard.ref, fun handle_open_doc/3, Acc0) of - {ok, #doc{deleted=true}} when SuppressDeletedDoc -> + {ok, {ok, #doc{deleted=true}}} when SuppressDeletedDoc -> {not_found, deleted}; - {ok, {not_found, missing}} -> - {not_found, missing}; - Else -> - Else + {ok, Else} -> + Else; + Error -> + Error end. open_revs(DbName, Id, Revs, Options) -> @@ -154,7 +154,7 @@ make_key({not_found, missing}) -> {not_found, missing}. repair_read_quorum_failure(Replies) -> - case [Doc || {ok, Doc} <- Replies] of + case [Doc || {_Key, {ok, Doc}, _Count} <- Replies] of [] -> {stop, {not_found, missing}}; [Doc|_] -> |