datahike

Linus Ericsson 2024-02-07T15:29:39.536679Z

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?

👍 1
Linus Ericsson 2024-02-07T15:34:04.337749Z

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?

timo 2024-02-07T15:34:16.305719Z

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.

timo 2024-02-07T15:34:49.962119Z

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

Linus Ericsson 2024-02-07T15:47:04.605179Z

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.

timo 2024-02-07T15:48:17.105189Z

Yeah, probably a good idea to track it as a bug. Thanks!

Linus Ericsson 2024-02-07T16:31:43.760029Z

Here it is https://github.com/replikativ/datahike/issues/661

🙏 1
silian 2024-02-07T17:58:28.817139Z

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.)

timo 2024-02-08T07:35:04.408059Z

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...

whilo 2024-02-09T17:01:06.972979Z

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.

👍 2