Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Another round of Dialyzer work. #564

Merged
merged 17 commits into from
Mar 21, 2014
Merged

Another round of Dialyzer work. #564

merged 17 commits into from
Mar 21, 2014

Conversation

cmeiklejohn
Copy link
Contributor

Removes almost all but the remaining 15 Dialyzer errors. Each fix is it's own commit and contains the Dialyzer errors removed.

Tagging @seancribbs and @andrewjstone for reviews.

Resolves:

riak_repl_console.erl:473: Expression produces a value of type ['ok'], but this value is unmatched
riak_repl_console.erl:478: Expression produces a value of type ['ok'], but this value is unmatched
Resolves:

riak_repl_leader.erl:338: Expression produces a value of type 'ok' | [any()], but this value is unmatched
riak_repl_leader.erl:346: Expression produces a value of type 'ok' | [any()], but this value is unmatched
Resolves:

riak_repl_leader.erl:288: The created fun has no local return
Resolves:

riak_repl_fullsync_worker.erl:83: Record construction #riak_kv_get_req_v1{bkey::{_,_},req_id::reference()} violates the declared type of field req_id::'undefined' | non_neg_integer()
Resolves:

riak_repl_fullsync_worker.erl:105: Expression produces a value of type ['ok' | {'error',_}], but this value is unmatched
Resolves:

riak_repl_fullsync_worker.erl:46: Expression produces a value of type 'ok' | 'skipped' | {'error',_}, but this value is unmatched
riak_repl_fullsync_worker.erl:98: Expression produces a value of type 'ok' | 'skipped' | {'error',_}, but this value is unmatched
Resolves:

riak_repl_fullsync_worker.erl:110: Expression produces a value of type 'ok' | {'error',_}, but this value is unmatched'
Resolves:

riak_core_connection_mgr_stats.erl:262: Expression produces a value of type 'ok' | {'error',_,'metric_already_exists' | 'unsupported_metric_type'}, but this value is unmatched
Resolves:

riak_core_connection_mgr_stats.erl:51: Expression produces a value of type [any()], but this value is unmatched
Resolves:

riak_core_connection_mgr_stats.erl:54: The pattern [{Name, Type} | _] can never match the type []
Resolves:

riak_repl_console.erl:387: Expression produces a value of type 'ok' | {'error',{'badarg',[any()]}}, but this value is unmatched
Resolves:

riak_repl2_leader.erl:159: The created fun has no local return
Resolves:

gen_leader.erl:438: Expression produces a value of type {[any()],[atom()]}, but this value is unmatched
Resolves:

riak_core_connection_mgr.erl:538: Record construction #ep{nb_curr_connections::non_neg_integer(),nb_success::non_neg_integer(),nb_failures::pos_integer(),is_black_listed::'true',backoff_delay::number(),failures::[{_,_},...],last_fail_time::{non_neg_integer(),non_neg_integer(),non_neg_integer()},next_try_secs::float()} violates the declared type of field next_try_secs::'undefined' | non_neg_integer()
Resolves:

riak_core_cluster_mgr.erl:711: Function cluster_mgr_sites_fun/0 has no local return
riak_core_cluster_mgr.erl:714: The call riak_repl_ring:get_clusters(Ring::{'error','no_ring'} | {'ok',tuple()}) does not have a term of type {'chstate_v2',_,'undefined' | [vclock:dot()],'undefined' | {pos_integer(),[{_,_}]},'undefined' | dict(),'undefined' | {_,_},'undefined' | [{integer(),_,_,[any()],'awaiting' | 'complete'}],'undefined' | [{atom(),{_,_,_}}],_,'undefined' | [{_,[any()]}],'undefined' | [vclock:dot()]} (with opaque subterms) as 1st argument
@@ -710,7 +710,7 @@ persist_members_to_ring(State, ClusterName, Members) ->
%% that were saved in the ring
cluster_mgr_sites_fun() ->
%% get cluster names from cluster manager
Ring = riak_core_ring_manager:get_my_ring(),
{ok, Ring} = riak_core_ring_manager:get_my_ring(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wow, good catch. Amazing this hasn't caused issues in the past

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We've flattened a bunch of the locator stuff, so it's probably used in very few cases at this point.

@seancribbs
Copy link

Other than the one comment I left on 60987bc, I'm ok with this. Good work. 👍

@andrewjstone
Copy link
Contributor

replication2 passes
👍

cmeiklejohn added a commit that referenced this pull request Mar 21, 2014
Another round of Dialyzer work.
@cmeiklejohn cmeiklejohn merged commit 484abe1 into develop Mar 21, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants