jjmrocha / gibreel

Distributed cache implemented in Erlang

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

badarith error

goncalo-pereira opened this issue · comments

g_cache:get outputs the following errors:
Error in process <0.63.0> with exit value:
{badarith,[{g_cache,get_timeout,2,[{file,"src/g_cache.erl"},{line,462}]},
{g_cache,api_store,6,[{file,"src/g_cache.erl"},{line,332}]}]}

The error can be reproduced doing:

  1. application:start(columbo).
  2. application:start(cclock).
  3. application:start(gibreel).
  4. LoadFunction = fun(Key) -> {ola, adeus} end.
  5. Options = [{get_value_function, LoadFunction}, {max_age, 600}, {purge_interval, 60}, {cluster_nodes, all}].
  6. gibreel:create_cache(cagandacache, Options).
  7. g_cache:get(cagandacache, <<"chavinha">>).
    Full error report:
    =ERROR REPORT==== 11-Feb-2016::17:09:18 ===
    Error in process <0.63.0> with exit value:
    {badarith,[{g_cache,get_timeout,2,[{file,"src/g_cache.erl"},{line,462}]},
    {g_cache,api_store,6,[{file,"src/g_cache.erl"},{line,332}]}]}
    {ok,{ola,adeus},1455210558793915}