synrc / kvs

💿 KVS: NVMe Key-Value Store

Home Page:https://kvs.n2o.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Move id_seq to separate schema

denys-potapov opened this issue · comments

commented

id_seq is table required for store_mnesia:next_id/2 to work. And now id_seq is defined in kvs_subscription schema.

So, it should be moved to something like kvs_system schema. Or there could be a note in readme that kvs_subscription is required.

if you don't want subscription table while you bootstrapping your own schema, just don't include kvs_subscription in sys.config kvs metainfo and use:

#table{name=id_seq,fields=record_info(fields,id_seq),keys=[thing]}

In your metainfo file. KVS already came up with set of tables and this bundle is atomic.

commented

Yes, i've added the id_seq table to my schema. But it's not obvious from readme that this table is required for custom schema.

All custom schema is up to you. KVS is shipped with a set of table that you cannot disable. If you don't like KVS tables just don't use it. KVS tables is a bundle. You may add tables to KVS, but not replace them. Now you don't see that you need subscription table, but subscription table if fundamental table, anyway you will invent something similar.

commented

Ok, got it. Thanks.