Use mutex for kvs