Ported db to cznic/kv
Don't smear the transaction over the writer loop