From 9ee856ab1cf7964c0296510f4a6995c8ecd66fbd Mon Sep 17 00:00:00 2001 From: Christopher Date: Sat, 7 Mar 2020 22:56:10 -0600 Subject: [PATCH] just insert --- lib/cluster_kv/db.ex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/cluster_kv/db.ex b/lib/cluster_kv/db.ex index f7ff656..ca8eae5 100644 --- a/lib/cluster_kv/db.ex +++ b/lib/cluster_kv/db.ex @@ -92,7 +92,7 @@ defmodule ClusterKV.DB do {[], 0} lb -> - Process.send_after(self(), :process_batch, 0) + Process.send_after(self(), :process_batch, 10) {batch, lb} end end @@ -110,7 +110,7 @@ defmodule ClusterKV.DB do [{_, val} = old] when is_list(val) -> new = fun.(old, value) - 1 = :ets.select_replace(db, [{old, [], [{:const, new}]}]) + 1 = :ets.insert(db, new) [_] -> :ets.insert(db, {key, [value]}) -- 2.45.3