Skip to content
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

Konserve crash by throwaway database #6

Closed
vizanto opened this issue Jun 28, 2018 · 1 comment
Closed

Konserve crash by throwaway database #6

vizanto opened this issue Jun 28, 2018 · 1 comment

Comments

@vizanto
Copy link

vizanto commented Jun 28, 2018

Trying to transact into a throwaway database:

(defn m-exec []
  (let [transaction-temporary-db
        (datahike.core/create-conn schema)
        _ @(datahike.api/transact transaction-temporary-db transfer-transaction)
...

Results in exception:

Exception in thread "async-dispatch-9" java.lang.NullPointerException
	at clojure.core$deref_future.invokeStatic(core.clj:2292)
	at clojure.core$deref.invokeStatic(core.clj:2312)
	at clojure.core$deref.invoke(core.clj:2298)
	at konserve.core$get_lock.invokeStatic(core.cljc:29)
	at konserve.core$get_lock.invoke(core.cljc:28)
	at konserve.core$assoc_in$fn__15615$state_machine__8622__auto____15622$fn__15625.invoke(core.cljc:87)
	at konserve.core$assoc_in$fn__15615$state_machine__8622__auto____15622.invoke(core.cljc:87)
	at clojure.core.async.impl.ioc_macros$run_state_machine.invokeStatic(ioc_macros.clj:973)
	at clojure.core.async.impl.ioc_macros$run_state_machine.invoke(ioc_macros.clj:972)
	at clojure.core.async.impl.ioc_macros$run_state_machine_wrapped.invokeStatic(ioc_macros.clj:977)
	at clojure.core.async.impl.ioc_macros$run_state_machine_wrapped.invoke(ioc_macros.clj:975)
	at konserve.core$assoc_in$fn__15615.invoke(core.cljc:87)
	at clojure.lang.AFn.run(AFn.java:22)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:748)
@whilo
Copy link
Member

whilo commented Jun 28, 2018

You have mixed the api.cljc's connection with the conn from core.cljc. This is currently not supported.

@whilo whilo closed this as completed Jun 28, 2018
TimoKramer added a commit that referenced this issue Apr 16, 2020
Since PostgreSQL supports encrypted connections there is the
need to add this option to datahike as well. I added the
corresponding configuration and adapted the datahike-postgres
library to the new options and the new configuration format.

It seemed to make more sense to switch datahike-postgres
to pass the configuration as map because konserve-pg is able
to handle a map anyways. Converting a string to map to string
did not seem reasonable so I switched the lib to use map as
well without breaking the api.

- PR #6 in replikative/datahike-postgres
- Closes #133
TimoKramer added a commit that referenced this issue Apr 16, 2020
Since PostgreSQL supports encrypted connections there is the
need to add this option to datahike as well. I added the
corresponding configuration and adapted the datahike-postgres
library to the new options and the new configuration format.

It seemed to make more sense to switch datahike-postgres
to pass the configuration as map because konserve-pg is able
to handle a map anyways. Converting a string to map to string
did not seem reasonable so I switched the lib to use map as
well without breaking the api.

- PR #6 in replikative/datahike-postgres
- Closes #133
TimoKramer added a commit that referenced this issue Apr 16, 2020
Since PostgreSQL supports encrypted connections there is the
need to add this option to datahike as well. I added the
corresponding configuration and adapted the datahike-postgres
library to the new options and the new configuration format.

It seemed to make more sense to switch datahike-postgres
to pass the configuration as map because konserve-pg is able
to handle a map anyways. Converting a string to map to string
did not seem reasonable so I switched the lib to use map as
well without breaking the api.

- PR #6 in replikative/datahike-postgres
- Closes #133
TimoKramer added a commit that referenced this issue May 20, 2020
Since PostgreSQL supports encrypted connections there is the
need to add this option to datahike as well. I added the
corresponding configuration and adapted the datahike-postgres
library to the new options and the new configuration format.

It seemed to make more sense to switch datahike-postgres
to pass the configuration as map because konserve-pg is able
to handle a map anyways. Converting a string to map to string
did not seem reasonable so I switched the lib to use map as
well without breaking the api.

- PR #6 in replikative/datahike-postgres
- Closes #133
TimoKramer added a commit that referenced this issue May 20, 2020
Since PostgreSQL supports encrypted connections there is the
need to add this option to datahike as well. I added the
corresponding configuration and adapted the datahike-postgres
library to the new options and the new configuration format.

It seemed to make more sense to switch datahike-postgres
to pass the configuration as map because konserve-pg is able
to handle a map anyways. Converting a string to map to string
did not seem reasonable so I switched the lib to use map as
well without breaking the api.

- PR #6 in replikative/datahike-postgres
- Closes #133
TimoKramer added a commit that referenced this issue May 21, 2020
Since PostgreSQL supports encrypted connections there is the
need to add this option to datahike as well. I added the
corresponding configuration and adapted the datahike-postgres
library to the new options and the new configuration format.

It seemed to make more sense to switch datahike-postgres
to pass the configuration as map because konserve-pg is able
to handle a map anyways. Converting a string to map to string
did not seem reasonable so I switched the lib to use map as
well without breaking the api.

- PR #6 in replikative/datahike-postgres
- Closes #133
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants