replikativ / konserve

A clojuresque key-value/document store protocol with core.async.
Eclipse Public License 1.0
299 stars 25 forks source link

Exception with core.async 0.7.599 #30

Closed danielsz closed 3 years ago

danielsz commented 4 years ago

Hi,

I started seeing an exception after upgrading to the latest core.async. Trail leads back to https://github.com/replikativ/konserve/blob/4750a648f40862b51d196c16c45c3bb10b1eacb5/src/konserve/filestore.clj#L447 but I'm not sure what's going on.

java.lang.IllegalArgumentException: No implementation of method: :close! of protocol: #'clojure.core.async.impl.protocols/Channel found for class: nil
        at clojure.core$_cache_protocol_fn.invokeStatic(core_deftype.clj:583)
        at clojure.core$_cache_protocol_fn.invoke(core_deftype.clj:575)
        at clojure.core.async.impl.protocols$eval12984$fn__12985$G__12973__12990.invoke(protocols.clj:21)
        at clojure.core.async.impl.ioc_macros$run_state_machine_wrapped.invokeStatic(ioc_macros.clj:984)
        at clojure.core.async.impl.ioc_macros$run_state_machine_wrapped.invoke(ioc_macros.clj:980)
        at konserve.filestore$new_fs_store$fn__13845.invoke(filestore.clj:470)
        at clojure.lang.AFn.run(AFn.java:22)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at clojure.core.async.impl.concurrent$counted_thread_factory$reify__13222$fn__13223.invoke(concurrent.clj:29)
        at clojure.lang.AFn.run(AFn.java:22)
        at java.base/java.lang.Thread.run(Thread.java:834)
whilo commented 4 years ago

Hey Daniel. Thanks for reporting. Which konserve version is this?

whilo commented 4 years ago

It must be happening here: https://github.com/replikativ/konserve/blob/4750a648f40862b51d196c16c45c3bb10b1eacb5/src/konserve/filestore.clj#L483

Can you verify this, e.g. by creating a new empty store that does not trigger this branch?

danielsz commented 4 years ago

Hello Christian,

Took me some time to get to it, but I can now confirm that working with a new empty store does not trigger the error with core.async 0.7.599. Here is my test.

whilo commented 4 years ago

@FerdiKuehne and I have tried to reproduce the bug today, but could not get the Kampbell test to do so. Can you maybe send a problematic store (that is throwing the error in the migration) in zip form to c.weilbach AT lambdaforge DOT io ? Maybe it is also related to the rest of your environment, e.g. the Java version.

whilo commented 3 years ago

I have bumped the core.async dependencies with the latest release and I think it should work now. If not feel free to reopen.

danielsz commented 3 years ago

Sorry for not being responsive, it slipped my mind. Thank you!