cloudant/fabric — pull request #68 by davisp (2012-11-26 19:10:19+00:00)
Title: 15492 fix showroom users cache

Make sure that the we report errors when the fabric_db_update_listener process dies. There are two unrelated commits here that should both address the same issue. The first throws an error if recieve_results/3 returns anything other than {ok, Acc}. The second commit also throws an error if we detect that the listener dies without crashing so that we don't end up waiting on an infinite timeout.

To reproduce before this patch:

{monitors, [{process, MPid}]} = process_info(whereis(showroom_users_cache), monitors),
{links, [LPid]} = process_info(MPid, links),
LPid ! {rexi_DOWN, nil, {nil, node()}, nil}.

I've tested before and after the patch and can show that the patch prevents the update listener from getting wedged in fabric_db_update_lister:wait_db_updated/1 that we found to be at issue in FB 15492.