]> Entropealabs - cluster_kv.git/commitdiff
make sure batch is instantiated as list
authorChristopher <chris@entropealabs.com>
Sun, 8 Mar 2020 21:30:32 +0000 (16:30 -0500)
committerChristopher <chris@entropealabs.com>
Sun, 8 Mar 2020 21:30:32 +0000 (16:30 -0500)
lib/cluster_kv/db.ex

index e0d096be1f3904033c570b9a991a84d122a52005..37b7eafb8b677148004a7762fac85dab667716b7 100644 (file)
@@ -6,7 +6,7 @@ defmodule ClusterKV.DB do
 
   @db_options [:set]
 
-  defstruct [:db, :batch, :batch_chunk, :batch_fun, last_batch: 0]
+  defstruct [:db, :batch_chunk, :batch_fun, last_batch: 0, batch: []]
 
   @type t :: %__MODULE__{
           db: :ets.tid() | atom(),