@cryptotaxi247 / kubo / commits / 74dcf427f

go-ipfs-config: Remove badger2 profile

This is needed for the upcoming release since there is not yet an official badger2 release with the items needed for use by IPFS.

gammazero committed Nov 23, 2020 at 17:09 UTC 74dcf427fcbb9389574294a7e3ec6ed6a9dcaed7
2 files changed +1 -35
config/init.go
-13
@@ -142,19 +142,6 @@ func badgerSpec() map[string]interface{} {
142 }
143 }
144
145 -func badger2Spec() map[string]interface{} {
146 - return map[string]interface{}{
147 - "type": "measure",
148 - "prefix": "badger2.datastore",
149 - "child": map[string]interface{}{
150 - "type": "badger2ds",
151 - "path": "badger2ds",
152 - "syncWrites": false,
153 - "truncate": true,
154 - },
155 - }
156 -}
157 -
145 func flatfsSpec() map[string]interface{} {
146 return map[string]interface{}{
147 "type": "mount",
config/profile.go
+1 -22
@@ -152,27 +152,6 @@ This profile may only be applied when first initializing the node.
152 "badgerds": {
153 Description: `Configures the node to use the badger datastore.
154
155 -This is a fast datastore. Use this datastore if performance, especially
156 -when adding many gigabytes of files, is critical. However:
157 -
158 -* This datastore will not properly reclaim space when your datastore is
159 - smaller than several gigabytes. If you run IPFS with '--enable-gc' (you have
160 - enabled block-level garbage collection), you plan on storing very little data in
161 - your IPFS node, and disk usage is more critical than performance, consider using
162 - flatfs.
163 -* This datastore uses up to several gigabytes of memory.
164 -
165 -This profile may only be applied when first initializing the node.`,
166 -
167 - InitOnly: true,
168 - Transform: func(c *Config) error {
169 - c.Datastore.Spec = badgerSpec()
170 - return nil
171 - },
172 - },
173 - "badger2ds": {
174 - Description: `Configures the node to use the badger2 datastore.
175 -
155 This is the fastest datastore. Use this datastore if performance, especially
156 when adding many gigabytes of files, is critical. However:
157
@@ -187,7 +166,7 @@ This profile may only be applied when first initializing the node.`,
166
167 InitOnly: true,
168 Transform: func(c *Config) error {
190 - c.Datastore.Spec = badger2Spec()
169 + c.Datastore.Spec = badgerSpec()
170 return nil
171 },
172 },