Fork me on GitHub
#datahike
<
2021-02-06
>
levitanong14:02:11

Hi all! I'm getting a strange error in my production database of my toy app:

Error during transaction java.lang.IllegalArgumentException: No implementation of method: :-resolve-chan of protocol: #'hitchhiker.tree.node/IAddress found for class: clojure.lang.PersistentArrayMap
I've done a datahike.migrate/export-db and I can't see any particularly strange data in here. 😮 This only started happening after a couple of days of usage, so I'm guessing it has something to do with corrupted data entry.

timo08:02:53

Hi @U0BR5D7A6. Thanks for reporting! May I ask which version and what backend you are using?

levitanong08:02:41

@U4GEXTNGZ hello! I'm on 0.3.3, on the postgres backend. Not using the one that's on the github though. Had to fork it so that it uses the new datahike config format or somesuch. (That might also be something for you guys to take a look at, btw.)

timo09:02:57

Ok, that's a bummer. We are running integration tests against our datahike-postgres-backend.

timo09:02:52

I did not find a fork of datahike-postgres under your name so it is hard for me to figure out what the problem might be right now. Can you show your backend? We will have to ask everyone using the postgres-backend to switch to the jdbc-backend soon because we will be continuing with that one soon. Maybe you want to already switch?

levitanong09:02:17

Ah, I got lazy, so I just copied the entire core.clj file. 😆 this is the jdbc backend, yes? https://github.com/replikativ/datahike-jdbc

levitanong09:02:16

I'll give it a try and see if the issue persists 🙂

timo09:02:54

I am looking forward to hear from your experience. I did not try it myself yet.

timo09:02:06

It might be necessary to do the import/export for that

levitanong11:02:36

Haha it appears I’ll have to do import/export. I just tried it and the data seems to have disappeared. Or at least, it is inaccessible. 😆good thing I had already made an export.

timo11:02:13

ok, should I have warned you explicitly to make an export before? Is it now working with jdbc?

levitanong12:02:36

@U4GEXTNGZ I think the warning would've been nice, but I do remember reading something about exporting when upgrading versions. So that's mostly my fault for not keeping that top of mind 😅 But also yay me for exporting beforehand anyway, so no harm done! As for whether or not it's working, I suspect that what fixed the issue was more because switching over to the postgres-jdbc lib reset the db altogether, so whatever problematic data was in there got removed anyway. Whatever corruption that was, was likely in the db itself, but somehow was being ignored when exporting, which is why the exported data was fine.

levitanong12:02:05

I'll update this thread if the problem arises again in the coming days!

timo12:02:47

That's great! I am glad it worked out (for now). Thanks for telling me.

🙏 3
levitanong13:02:10

Thanks for the help! 😄

levitanong02:02:19

Oh dear, it happened again 😞 This happened after I restarted my server following an entity reference error. Error during transaction clojure.lang.ExceptionInfo: Nothing found for entity id REDACTED {:error :entity-id/missing, :entity-id REDACTED} I'm not sure if the two are connected or coincidental.

Error during transaction java.lang.IllegalArgumentException: No implementation of method: :-resolve-chan of protocol: #'hitchhiker.tree.node/IAddress found for class: clojure.lang.PersistentArrayMap

timo08:02:41

@U0BR5D7A6 Would you open an issue on github and describe what you did there? We are happy to try reproducing it and fixing any bug that comes up.

levitanong12:02:17

Issue filed here, with an account of the first instance included. https://github.com/replikativ/datahike/issues/285

👍 3
J17:02:25

Hi guys! I’m testing datahike with datahike-jdbc on postgres. I found the transact a bit slower. It’s normal?

timo10:02:54

Hi @UHZPYLPU1, slower than what?

J11:02:19

Hi @U4GEXTNGZ, I found the transact a bit slower (5s) for transact one item. I tested datahike with file storage and I have the same time for one item.

timo11:02:13

I assume you are saying that you are comparing file-store with a jdbc-store. I think file-store is faster than jdbc most of the times but I would have to forward this to colleagues here on the channel. @U1C36HC6N @UB95JRKM3 @UQVCR784A

J12:02:11

My test with file storage took the same time than jdbc (for one item in transact)

timo15:02:30

Hi @UHZPYLPU1. I saw you were opening an issue. May I ask you to provide some more details on your problem. We need some steps to reproduce it. Usually we don't see these kinds of lags when transacting. Maybe you can run a benchmark: https://cljdoc.org/d/io.replikativ/datahike/0.3.3/doc/contributing-to-datahike#starting-the-benchmark

J15:02:18

Hi @U4GEXTNGZ, yeah I created an issue for historise my issue. Ok, I’m going to launch the benchmark to my computer.

timo15:02:59

run it with TIMBRE_LEVEL=':info' clj -M:benchmark

timo15:02:07

better to not have all the logs

timo15:02:15

will adjust that in the docs

timo15:02:00

https://gist.github.com/TimoKramer/bfd16a506e4950bda7b742b362e9e6f2 that's my benchmark a few seconds ago on my machine running a lot of stuff

J16:02:02

Humm... I have this error when I run the benchmark