-
Notifications
You must be signed in to change notification settings - Fork 32
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
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
d1b2b58
Address ignore match.
cmeiklejohn 76938c2
Standardize the return value from ensure_sites.
cmeiklejohn b111d15
Add final return call.
cmeiklejohn 60987bc
Fix KV req_id match the record type.
cmeiklejohn eebb351
Ignore the result of the list comprehension.
cmeiklejohn 9e101e0
Normalize return values.
cmeiklejohn e0329a4
Ignore return value.
cmeiklejohn 3b42dae
Crash if statistic can't be registered.
cmeiklejohn 2793e99
Ignore result of the list comprehension.
cmeiklejohn 42f6e8c
Remove static registration of empty list.
cmeiklejohn c90c9d6
Ignore match.
cmeiklejohn c0ff2b6
Normalize return value and provide local return.
cmeiklejohn 23bc0f3
Ignore the result of the multicall.
cmeiklejohn e5c4d7a
Fix incorrect record construction.
cmeiklejohn 448dc93
Add missing specification.
cmeiklejohn 7ed8666
Fix incorrect match on the ring.
cmeiklejohn fb5c8dc
Ignore outdated specs from old ranch.
cmeiklejohn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,7 +45,7 @@ handle_call({get, B, K, Transport, Socket, Pool, Ver}, From, State) -> | |
%% key and let the other side sort things out. | ||
case riak_repl_util:repl_helper_send(RObj, Client) of | ||
cancel -> | ||
skipped; | ||
ok; | ||
Objects when is_list(Objects) -> | ||
%% Cindy: Santa, why can we encode our own binary object? | ||
%% Santa: Because the send() function will convert our tuple | ||
|
@@ -56,7 +56,8 @@ handle_call({get, B, K, Transport, Socket, Pool, Ver}, From, State) -> | |
|| O <- Objects], | ||
_ = riak_repl_tcp_server:send(Transport, Socket, | ||
riak_repl_util:encode_obj_msg( | ||
Ver,{fs_diff_obj,RObj})) | ||
Ver,{fs_diff_obj,RObj})), | ||
ok | ||
end, | ||
ok; | ||
{error, notfound} -> | ||
|
@@ -78,7 +79,7 @@ handle_call({get, B, K, Transport, Socket, Pool, Partition, Ver}, From, State) - | |
|
||
Preflist = [{Partition, OwnerNode}], | ||
|
||
ReqID = make_ref(), | ||
ReqID = make_req_id(), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wow, another great catch. |
||
|
||
Req = ?KV_GET_REQ{bkey={B, K}, req_id=ReqID}, | ||
%% Assuming this function is called from a FSM process | ||
|
@@ -97,18 +98,19 @@ handle_call({get, B, K, Transport, Socket, Pool, Partition, Ver}, From, State) - | |
{ok, Client} = riak:local_client(), | ||
case riak_repl_util:repl_helper_send(RObj, Client) of | ||
cancel -> | ||
skipped; | ||
ok; | ||
Objects when is_list(Objects) -> | ||
%% Cindy: Santa, why can we encode our own binary object? | ||
%% Santa: Because, Cindy, the send() function accepts | ||
%% either a binary or a term. | ||
[riak_repl_tcp_server:send(Transport, Socket, | ||
_ = [riak_repl_tcp_server:send(Transport, Socket, | ||
riak_repl_util:encode_obj_msg( | ||
Ver,{fs_diff_obj,O})) | ||
|| O <- Objects], | ||
riak_repl_tcp_server:send(Transport, Socket, | ||
_ = riak_repl_tcp_server:send(Transport, Socket, | ||
riak_repl_util:encode_obj_msg( | ||
Ver,{fs_diff_obj,RObj})) | ||
Ver,{fs_diff_obj,RObj})), | ||
ok | ||
end, | ||
ok; | ||
{r, {error, notfound}, _, ReqID} -> | ||
|
@@ -161,3 +163,6 @@ do_binputs_internal(BinObjs, DoneFun, Pool, Ver) -> | |
poolboy:checkin(Pool, self()), | ||
%% let the caller know | ||
DoneFun(). | ||
|
||
make_req_id() -> | ||
erlang:phash2({self(), os:timestamp()}). % stolen from riak_client |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.