Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Update for new poolboy API

  • Loading branch information...
commit f42b5d3b61df2fd1dba36e0b798e34b274cef74e 1 parent dbaebcc
Andrew Thompson Vagabond authored
Showing with 3 additions and 4 deletions.
  1. +3 −4 src/riak_core_vnode_worker_pool.erl
7 src/riak_core_vnode_worker_pool.erl
View
@@ -54,15 +54,14 @@ init([WorkerMod, PoolSize, VNodeIndex, WorkerArgs, WorkerProps]) ->
{ok, Pid} = poolboy:start_link([{worker_module, riak_core_vnode_worker},
{worker_args, [VNodeIndex, WorkerArgs, WorkerProps]},
{worker_callback_mod, WorkerMod},
- {size, PoolSize}, {max_overflow, 0},
- {checkout_blocks, false}]),
+ {size, PoolSize}, {max_overflow, 0}]),
Yurii Rashkovskii
yrashk added a note

any reason why it shouldn't be possible to configure max_overflow?

We didn't need it at the time. Patch it in if you need it and make a PR.

Yurii Rashkovskii
yrashk added a note

Gotcha. Will do

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
{ok, ready, #state{pool=Pid}}.
ready(_Event, _From, State) ->
{reply, ok, ready, State}.
ready({work, Work, From} = Msg, #state{pool=Pool, queue=Q, monitors=Monitors} = State) ->
- case poolboy:checkout(Pool) of
+ case poolboy:checkout(Pool, false) of
full ->
{next_state, queueing, State#state{queue=queue:in(Msg, Q)}};
Pid when is_pid(Pid) ->
@@ -103,7 +102,7 @@ handle_event({checkin, Worker}, _, #state{pool = Pool, queue=Q, monitors=Monitor
Monitors = lists:keydelete(Worker, 1, Monitors0),
case queue:out(Q) of
{{value, {work, Work, From}}, Rem} ->
- case poolboy:checkout(Pool) of
+ case poolboy:checkout(Pool, false) of
full ->
{next_state, queueing, State#state{queue=Q,
monitors=Monitors}};
Yurii Rashkovskii

any reason why it shouldn't be possible to configure max_overflow?

Andrew Thompson

We didn't need it at the time. Patch it in if you need it and make a PR.

Please sign in to comment.
Something went wrong with that request. Please try again.