Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not allow to provide custom DB (Level DB) Options #10212

Closed
moniya12 opened this issue Sep 21, 2021 · 5 comments
Closed

Does not allow to provide custom DB (Level DB) Options #10212

moniya12 opened this issue Sep 21, 2021 · 5 comments

Comments

@moniya12
Copy link

node.DefaultDBProvider,

As Node is initialized with DefaultDBProvider (Tendermint), applications are not able to expose custom DB Options. Tendermint DB supports DB with custom options - https://github.com/tendermint/tm-db/blob/358078c8bed0eb5113fef6bea376d1a620757308/goleveldb/db.go#L24 but application are not able to use it as CosmosSDK only allows default db provider.

Enabling custom LevelDB (or RocksDB) options would allow validators and app developer provide aggressive pruning options. Without aggressive pruning we are not able to reclaim space for months (when pruning is enabled).

We have thread over here explaining how default Level DB compactions does not reclaim space for months - https://twitter.com/valnodes/status/1435465250803945472

@JayT106
Copy link
Contributor

JayT106 commented Mar 15, 2022

@tac0turtle
Copy link
Member

@moniya12 which setting would you want to add?

@tac0turtle
Copy link
Member

exposing this to the application makes sense to me. @alexanderbez thoughts on including this in the design of store v2?

@yihuang
Copy link
Collaborator

yihuang commented Mar 6, 2023

We did this with rocksdb by adding an API NewDBWithRawDB, so user can open the db in whatever way they want, we just need to provide similar APIs for all supporting backends I think.
Then in server start command, allow user to supply a custom db opener callback.

@alexanderbez
Copy link
Contributor

Yeah we'll do this in the store V2 design, although we'll stick with RocksDB as the default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment