Skip to content

Commit

Permalink
go-ipfs-config: Merge pull request ipfs#115 from ipfs/chore/rm-badger2
Browse files Browse the repository at this point in the history
Remove badger2 profile
  • Loading branch information
aschmahmann authored Nov 24, 2020
2 parents 1ec9262 + 74dcf42 commit d445c0c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 35 deletions.
13 changes: 0 additions & 13 deletions config/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,19 +142,6 @@ func badgerSpec() map[string]interface{} {
}
}

func badger2Spec() map[string]interface{} {
return map[string]interface{}{
"type": "measure",
"prefix": "badger2.datastore",
"child": map[string]interface{}{
"type": "badger2ds",
"path": "badger2ds",
"syncWrites": false,
"truncate": true,
},
}
}

func flatfsSpec() map[string]interface{} {
return map[string]interface{}{
"type": "mount",
Expand Down
23 changes: 1 addition & 22 deletions config/profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,27 +152,6 @@ This profile may only be applied when first initializing the node.
"badgerds": {
Description: `Configures the node to use the badger datastore.
This is a fast datastore. Use this datastore if performance, especially
when adding many gigabytes of files, is critical. However:
* This datastore will not properly reclaim space when your datastore is
smaller than several gigabytes. If you run IPFS with '--enable-gc' (you have
enabled block-level garbage collection), you plan on storing very little data in
your IPFS node, and disk usage is more critical than performance, consider using
flatfs.
* This datastore uses up to several gigabytes of memory.
This profile may only be applied when first initializing the node.`,

InitOnly: true,
Transform: func(c *Config) error {
c.Datastore.Spec = badgerSpec()
return nil
},
},
"badger2ds": {
Description: `Configures the node to use the badger2 datastore.
This is the fastest datastore. Use this datastore if performance, especially
when adding many gigabytes of files, is critical. However:
Expand All @@ -187,7 +166,7 @@ This profile may only be applied when first initializing the node.`,

InitOnly: true,
Transform: func(c *Config) error {
c.Datastore.Spec = badger2Spec()
c.Datastore.Spec = badgerSpec()
return nil
},
},
Expand Down

0 comments on commit d445c0c

Please sign in to comment.