Open yihuang opened 1 year ago
I'm generally happy to accommodate changes in this repo for our use case. Would you want to submit a proposal of the api change
Maybe the simplest way is just adding a new method to DB
interface:
OpenSubDB(name string) DB
If can return nil
if don't support similar concept.
And change here in cosmos-sdk into:
db := rs.db.OpenSubDB(params.key.Name())
if db == nil {
db = NewPrefixDB(...)
}
Or the unsupported db backends can just return a PrefixDB.
This change won't take advantage of atomic commit cross multiple column families, but that's another topic.
It'll need an option to switch explicitly, otherwise existing rocksdb nodes will suddenly fail.
column family fits well with different iavl stores, at least it's easier to check the db states of different stores, potentially could tune db options separately.
But it seems not easy to do that transparently, without changing a few apis.