basho / riak_repl

Riak DC Replication
Apache License 2.0
56 stars 32 forks source link

Fix supervisor PID leak in do_repl_put function #742

Closed nickelization closed 8 years ago

nickelization commented 8 years ago

There are some issues with the riak_kv API which will be fixed in a future release, but long story short, riak_kv_get_fsm:start_link doesn't always actually end up linking the caller to the new FSM process. This would cause the supervisor to end up with an endlessly growing list of workers, since it had no way of seeing when a child died.

To fix this resource leak, we can simply switch to starting the process directly, instead of using the supervisor API call. There's really no reason to run these processes under a supervisor anyway since they're normally started up under sidejob.

Note that in 2.2 this fix may be reworked again to use whatever new APIs we end up adding/changing in riak_kv.

For more info, see basho/riak_kv#1178 (RIAK-2157)

JeetKunDoug commented 8 years ago

+1 1e3a569

nickelization commented 8 years ago

@borshop merge