-
-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: delete-database throws NPE for :file backend #616
Comments
As discussed on Slack, I think it is best for us to require absolute paths in general, since we want to be able to address stores globally if possible. Currently we infer the hostname for the file store backend automatically, but we could also require to set it manually to fully identify the filesystem. That might be a bit less comfortable and still leaves room to use local hostnames that are not uniquely globally identified. |
Sorry that this happened. There should be at least a proper exception message that describes the problem and some documentation. |
We just need to check whether the user has provided an absolute path to the file store and otherwise throw an informative error message. |
I think it would be nicer though to accept relative paths as this is what I would expect and apparently I am not alone with this. Btw, So I would say, we have following options:
None of the solutions above require much work, it is merely a design decision. Which one would you prefer? |
I don't get why we need absolute paths to globally address stores. But I would expect to be able to use relative paths. So I tend to option 3 because relative paths for java.io.File are not prefixed. I wouldn't mind only using absolute paths with a proper error message though I currently don't see an easy way to know if a path is absolute or not. We would have to check if the first char of the path is either a slash or a letter and if it's a letter then it needs to be followed by a colon. And what if someone wants to use a network drive like a nas or something, is that possible? But maybe you've got a better way to solve that depending on the implementation details of the filestore. |
The filestore simply uses the Java classes |
The problem is that the database stores the store configuration in its store and it identifies itself through the path for the filestore backend (see In general we should aim for having DB configurations that allow to connect from anywhere to the database if you have credentials, then we can store the config in Datahike itself and run recursive queries with Datalog over the databases. |
I think it is best to resolve the paths when the config is loaded, e.g. in |
What version of Datahike are you using?
io.replikativ/datahike {:mvn/version "0.6.1539"}
What version of Java are you using?
17
What operating system are you using?
Ubuntu
What database EDN configuration are you using?
Describe the bug
delete-database
throws a null pointer exception. This seems to happen regardless of if the database was previously created or not, or transacted against and used.What is the expected behaviour?
The database should be deleted,
How can the behaviour be reproduced?
The text was updated successfully, but these errors were encountered: