|
@ -33,7 +33,7 @@ handleCall({mInitRank, RankType, CntLimit, CntMax}, State, _FROM) -> |
|
|
#{RankType := _} -> |
|
|
#{RankType := _} -> |
|
|
{reply, {error, used}}; |
|
|
{reply, {error, used}}; |
|
|
_ -> |
|
|
_ -> |
|
|
ets:new(RankType, [ordered_set, public, named_table, {write_concurrency, auto}, {read_concurrency, true}]), |
|
|
|
|
|
|
|
|
ets:new(RankType, [ordered_set, public, named_table, {write_concurrency, auto}, {read_concurrency, true}, {decentralized_counters, false}]), |
|
|
NewState = State#{RankType => {CntLimit, CntMax}}, |
|
|
NewState = State#{RankType => {CntLimit, CntMax}}, |
|
|
gtKvsToBeam:load(?ranksLimit, maps:to_list(NewState)), |
|
|
gtKvsToBeam:load(?ranksLimit, maps:to_list(NewState)), |
|
|
{reply, ok, NewState} |
|
|
{reply, ok, NewState} |
|
|