chore: modify db support (#14451)
This commit is contained in:
parent
f3dd51029a
commit
e048402efb
@ -4,6 +4,12 @@ This guide provides instructions for upgrading to specific versions of Cosmos SD
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
### Database configuration
|
||||
|
||||
Cleveldb, Boltdb and BadgerDB are not supported anymore. To migrate from a unsupported database to a supported database please use the database migration tool
|
||||
|
||||
<!-- TODO: write data base migration tool -->
|
||||
|
||||
### Protobuf
|
||||
|
||||
The SDK is in the process of removing all `gogoproto` annotations.
|
||||
|
||||
@ -36,7 +36,7 @@ func Cmd(appCreator servertypes.AppCreator) *cobra.Command {
|
||||
custom: allow pruning options to be manually specified through 'pruning-keep-recent'.
|
||||
besides pruning options, database home directory and database backend type should also be specified via flags
|
||||
'--home' and '--app-db-backend'.
|
||||
valid app-db-backend type includes 'goleveldb', 'cleveldb', 'rocksdb', 'boltdb', and 'badgerdb'.
|
||||
valid app-db-backend type includes 'goleveldb', 'rocksdb', 'pebbledb'.
|
||||
`,
|
||||
Example: "prune --home './' --app-db-backend 'goleveldb' --pruning 'custom' --pruning-keep-recent 100",
|
||||
RunE: func(cmd *cobra.Command, _ []string) error {
|
||||
|
||||
@ -373,6 +373,12 @@ func GetAppDBBackend(opts types.AppOptions) dbm.BackendType {
|
||||
if len(rv) == 0 {
|
||||
rv = cast.ToString(opts.Get("db-backend"))
|
||||
}
|
||||
|
||||
// Cosmos SDK has migrated to cosmos-db which does not support all the backends which tm-db supported
|
||||
if rv == "cleveldb" || rv == "badgerdb" || rv == "boltdb" {
|
||||
panic(fmt.Sprintf("invalid app-db-backend %q, use %q, %q, %q instead", rv, dbm.GoLevelDBBackend, dbm.PebbleDBBackend, dbm.RocksDBBackend))
|
||||
}
|
||||
|
||||
if len(rv) != 0 {
|
||||
return dbm.BackendType(rv)
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user