Closed
Description
When testing Cronos functionalities, we think the changes in tendermint/tm-db#218 made the DB consume too much RAM. Instead of hardcoding the max open file number, we prefer it to be adjustable based on the instance's resources.
Therefore,
We may introduce DBOptions
into dbCreator
, i.e.
type (
dbCreator func(name string, dir string, opts DBOptions) (DB, error)
DBOptions interface {
Get(string) interface{}
}
)
and introduce a new method and then update the original NewDB
implementation
func NewDBwithOptions(name string, backend BackendType, dir string, opts DBOptions) (DB, error) {
func NewDB(name string, backend BackendType, dir string) (DB, error) {
return NewDBwithOptions(name, backend, dir, nil)
}
Therefore, it will be easier to make DB adjustments to the Cosmos SDK when the DB supports certain options.
Metadata
Metadata
Assignees
Labels
No labels