Skip to content
This repository has been archived by the owner on Oct 8, 2024. It is now read-only.

Avoid (re)converting to the same datastore type #9

Closed
schomatis opened this issue Apr 19, 2018 · 2 comments
Closed

Avoid (re)converting to the same datastore type #9

schomatis opened this issue Apr 19, 2018 · 2 comments

Comments

@schomatis
Copy link
Contributor

If I run the conversion to Badger Datastore twice the second time (from badgerds to badgerds) happens even though there is no need for any conversion. If I'm following the code correctly that case corresponds to this strategy case, the directories that should be checked (as mentioned in the TODO) are the path components of the spec file?

@magik6k
Copy link
Contributor

magik6k commented Oct 5, 2018

Yup, path seems to be used for all FS based datastores, but that's not really standardized (+We'll need special cases for database-backed datastore, and I'm not sure if this works with paths out of .ipfs (because mounts))

https://github.com/ipfs/go-ipfs/blob/master/repo/fsrepo/datastores.go#L209

We should also consider rewriting this as a go-ipfs plugin so we would be able to use other datastore plugins, but that's a bit offtopic here

@gammazero
Copy link
Contributor

@magik6k It may be valid, in some cases, to convert from a datastore into a datastore of the same type. For example, suppose the same datastore is used, but with some different configuration. If I decide to enable compression after my datastore has been running for a long time, and only the new data get compressed, then I may want to do a convert to the same type of datastore to compress all the old data.

So, I don't actually think we need to fix this. Can we close this?

@lidel lidel closed this as completed Oct 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants