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

Never use infinity request timeouts #160

Merged
merged 1 commit into from
Feb 19, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions src/riakc_pb_socket.erl
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ stream_list_buckets(Pid, Options) ->
ReqId = mk_reqid(),
gen_server:call(Pid, {req, #rpblistbucketsreq{timeout=ServerTimeout,
stream=true},
infinity, {ReqId, self()}}, infinity).
ServerTimeout, {ReqId, self()}}, infinity).

legacy_list_buckets(Pid, Options) ->
ServerTimeout =
Expand All @@ -410,7 +410,7 @@ legacy_list_buckets(Pid, Options) ->
ST -> ST
end,
gen_server:call(Pid, {req, #rpblistbucketsreq{timeout=ServerTimeout},
infinity}, infinity).
ServerTimeout}, infinity).


%% @doc List all keys in a bucket
Expand Down Expand Up @@ -466,7 +466,7 @@ stream_list_keys(Pid, Bucket, Options) ->
end,
ReqMsg = #rpblistkeysreq{bucket = Bucket, timeout = ServerTimeout},
ReqId = mk_reqid(),
gen_server:call(Pid, {req, ReqMsg, infinity, {ReqId, self()}},
gen_server:call(Pid, {req, ReqMsg, ServerTimeout, {ReqId, self()}},
infinity).

%% @doc Get bucket properties.
Expand Down Expand Up @@ -823,9 +823,9 @@ get_index_eq(Pid, Bucket, Index, Key, Opts) ->
Call = case Stream of
true ->
ReqId = mk_reqid(),
{req, Req, infinity, {ReqId, self()}};
{req, Req, Timeout, {ReqId, self()}};
false ->
{req, Req, infinity}
{req, Req, Timeout}
end,
gen_server:call(Pid, Call, CallTimeout).

Expand Down Expand Up @@ -875,9 +875,9 @@ get_index_range(Pid, Bucket, Index, StartKey, EndKey, Opts) ->
Call = case Stream of
true ->
ReqId = mk_reqid(),
{req, Req, infinity, {ReqId, self()}};
{req, Req, Timeout, {ReqId, self()}};
false ->
{req, Req, infinity}
{req, Req, Timeout}
end,
gen_server:call(Pid, Call, CallTimeout).

Expand Down Expand Up @@ -909,7 +909,7 @@ cs_bucket_fold(Pid, Bucket, Opts) when is_pid(Pid), is_binary(Bucket), is_list(O
continuation=Continuation,
timeout=Timeout},
ReqId = mk_reqid(),
Call = {req, Req, infinity, {ReqId, self()}},
Call = {req, Req, Timeout, {ReqId, self()}},
gen_server:call(Pid, Call, CallTimeout).

%% @doc Return the default timeout for an operation if none is provided.
Expand Down