datahike

2024-08-15T19:11:15.625129Z

Is there any way to do a lazy pull over a large query result? like qseq in datomic? Or do I just need to build a composite tuple of the key I want to index on and use datoms?

2024-08-15T19:11:42.028899Z

If so, is there a way to make it so that a tuple will not insert if one of the elements is nil?

2024-08-15T20:19:13.073359Z

I'm getting an odd error. I'm doing serialized synchronous transactions on a datahike-jdbc connection backed by sqlite, and at some point an exception is being thrown by sqlite because it's complaining of being locked. This is in and of itself interesting and probably warrants I go look in on my jdbc connection or something, but it's not my primary issue. My primary issue is that this error results in the writer thread for the connection shutting down, and then all subsequent attempts I make at creating a new connection to the same sqlite database have transactions hang forever, even though queries work fine.

whilo 2024-08-28T19:43:12.155009Z

Regarding the error that the queries hang, you can release the connection completely https://cljdoc.org/d/io.replikativ/datahike/0.6.1572/api/datahike.api#release, by calling (release conn true) and then reconnect.

2024-08-28T19:43:47.933319Z

Thanks! I'll give that a shot to see if it resolves my issue when I create the minimal reproduction case.

2024-08-28T19:43:58.462259Z

That's still on my todo list to get done, I've just been busy

whilo 2024-08-28T19:45:11.177919Z

No problem. The locking error definitely should not happen.

whilo 2024-08-21T20:05:57.483719Z

Hey @suskeyhose! Do you happen to have the error at hand? It would be good to open a github issue to keep track of everything. This definitely should not happen.

whilo 2024-08-21T20:07:12.530739Z

It is a bit strange that there is a locking issue as the database should not be opened and closed while the datahike connection is open and I thought sqlite only locks at these points, but I guess it doesn't.

whilo 2024-08-21T20:07:29.614419Z

Also if you have a minimal reproducible case at hand and can add that that would be of great help!

2024-08-21T20:59:05.720009Z

I'll work on producing one!

whilo 2024-08-21T21:02:19.520329Z

Thank you!