summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Kocoloski <adam@cloudant.com>2010-07-10 15:50:17 -0400
committerAdam Kocoloski <adam@cloudant.com>2010-07-10 15:50:17 -0400
commitdc4f15e586112742cf54628e937e0f776022c953 (patch)
treeeaac5088ea4da6f10aeb61c95eb6396fcf3972bd
parent733c58a1e9f776f5f06c0c340571b6025276ffad (diff)
thank you dialyzer
-rw-r--r--src/fabric_all_databases.erl2
-rw-r--r--src/fabric_util.erl2
-rw-r--r--src/fabric_view.erl5
3 files changed, 5 insertions, 4 deletions
diff --git a/src/fabric_all_databases.erl b/src/fabric_all_databases.erl
index 97685f4e..e16429b1 100644
--- a/src/fabric_all_databases.erl
+++ b/src/fabric_all_databases.erl
@@ -6,7 +6,7 @@
-include_lib("mem3/include/mem3.hrl").
%% @doc gets all databases in the cluster.
--spec all_databases(binary() | []) -> [binary()].
+-spec all_databases(string()) -> {ok, [binary()]}.
all_databases([]) ->
Dbs = ets:foldl(fun(#shard{dbname=DbName}, AccIn) ->
new_acc(DbName, AccIn)
diff --git a/src/fabric_util.erl b/src/fabric_util.erl
index 3c27f19e..e928c5ff 100644
--- a/src/fabric_util.erl
+++ b/src/fabric_util.erl
@@ -28,7 +28,7 @@ receive_loop(Workers, Keypos, Fun, Acc0) ->
%% @doc set up the receive loop with an overall timeout
-spec receive_loop([any()], integer(), function(), any(), timeout(), timeout()) ->
- {ok, any()}.
+ {ok, any()} | timeout | {error, any()}.
receive_loop(RefPartMap, Keypos, Fun, Acc0, infinity, PerMsgTO) ->
process_mailbox(RefPartMap, Keypos, Fun, Acc0, nil, PerMsgTO);
receive_loop(RefPartMap, Keypos, Fun, Acc0, GlobalTimeout, PerMsgTO) ->
diff --git a/src/fabric_view.erl b/src/fabric_view.erl
index 6817a5b0..4f29abf7 100644
--- a/src/fabric_view.erl
+++ b/src/fabric_view.erl
@@ -9,7 +9,7 @@
-include_lib("couch/include/couch_db.hrl").
%% @doc looks for a fully covered keyrange in the list of counters
--spec is_progress_possible([{#shard{}, non_neg_integer()}]) -> boolean().
+-spec is_progress_possible([{#shard{}, term()}]) -> boolean().
is_progress_possible([]) ->
false;
is_progress_possible(Counters) ->
@@ -37,7 +37,8 @@ is_progress_possible(Counters) ->
end, Tail0, Rest),
Result =:= complete.
--spec remove_overlapping_shards(#shard{}, [#shard{}]) -> [#shard{}].
+-spec remove_overlapping_shards(#shard{}, [{#shard{}, any()}]) ->
+ [{#shard{}, any()}].
remove_overlapping_shards(#shard{range=[A,B]} = Shard0, Shards) ->
fabric_dict:filter(fun(#shard{range=[X,Y]} = Shard, _Value) ->
if Shard =:= Shard0 ->