sl
) do
nodes = HashRing.key_to_nodes(r, key, repls)
+ Logger.info("Picking node #{inspect(nodes)} - #{inspect(node)}")
node =
case node in nodes do
{:ok, %SL{sl | data: %Ring{data | requests: [{ref, from} | reqs]}}, []}
end
- def handle_call({:get, key}, from, _, sl), do: {:ok, sl, [{:reply, from, :no_quorum}]}
+ def handle_call({:get, _key}, from, _, sl), do: {:ok, sl, [{:reply, from, :no_quorum}]}
def handle_cast(
{:put, key, value},
{:ok, sl, []}
end
- def handle_cast({:put, key, value}, _, sl), do: {:ok, sl, []}
+ def handle_cast({:put, _key, _value}, _, sl), do: {:ok, sl, []}
def handle_cast({:sync, keys}, @ready, %SL{data: %Ring{db: db}} = sl) do
Enum.each(keys, fn {key, value} ->
{:ok, sl, []}
end
- def handle_cast({:sync, keys}, _, sl), do: {:ok, sl, []}
+ def handle_cast({:sync, _keys}, _, sl), do: {:ok, sl, []}
def handle_info({:get_key, key, ref, node}, @ready, %SL{data: %Ring{name: n, db: db}} = sl) do
val = DB.get(db, key)