I'm trying out datahike with this configuration
{:store {:backend :file :path "datahike2"} :attribute-refs? true} but after having restarted the project some times, i get a :config-does-not-match-stored-db error when starting, and the following diff: :diff ({:store [nil "127.0.0.1"]} {:store [nil "192.168.1.121"]}
What am I doing wrong?
The error most likely comes from that I turned on a VPN-service and restarted my project. However - it still does not really make sense to me - why is the IP important for file storage?
Hey @oscarlinusericsson, good to hear you're trying out datahike. This is a recurring problem since datahike is intended to work with a global address space.
I think this config validation is creating too much trouble. Here is a thread from a few weeks ago: https://clojurians.slack.com/archives/CB7GJAN0L/p1704135301700949
It sounds like this newly introduced abstraction could cause this particular problem, yes. Should I create a bug report or something? I don't know what your plan is for the file storage, but the behaviour I encountered seems wrong either way.
Yeah, probably a good idea to track it as a bug. Thanks!
Here it is https://github.com/replikativ/datahike/issues/661
Sorry I haven't got around to making that PR, timo! I continue to have same error where every time I fire up new REPL, I have to repeat the process of importing/exporting/creating a new database.
(If I just try to create a new def for the cfg store, Datahike yields the config-does-not-match-stored-db error.)
Yeah, I am stumbling over this myself and I think this needs to be removed or replaced with a manual check or config flag. I don't like how it is currently solved...
I replied on the issue, for this particular problem you need to set the :scope manually for the filestore, then it is not dependent on IP. I agree that it should be less obtrusive, but it is also important to not accidentally load the database with settings that would corrupt it or load the wrong database accidentally.