vlcn-io / cr-sqlite

Convergent, Replicated SQLite. Multi-writer and CRDT support for SQLite
https://vlcn.io
MIT License
2.61k stars 69 forks source link

no such function: crsql_internal_sync_bit #423

Closed sinkingsugar closed 5 months ago

sinkingsugar commented 5 months ago

Hi, thank you for this library 👍 , we are experimenting using it in a soon to be announced game creation system. So far so good. We use a slight older version cos current main branch gives an out of memory error on iOS, but that is not the issue here.

Opening a slightly older DB (still version 15000 though), I'm getting sporadically such: no such function: crsql_internal_sync_bit when doing Update ops.

Any idea on what is potentially going on would be appreciated?

Thank you 🙏

Edit: The extension is loaded as dll, successfully and many other queries already happened fine. Also we are heavily using threads but in a controlled manner.

sinkingsugar commented 5 months ago

Small update: Shuffling things around fixed it. By shuffling I mean every query is still running on different threads on a pool, but at a different pace. It's weird because there is still they same transaction mutex on the db connection (so there is only 1 write at any time)

tantaman commented 5 months ago

This error means that the extension wasn't loaded on the given connection. Is it possible that new connections are being used before loading the extension in your setup?

sinkingsugar commented 5 months ago

This error means that the extension wasn't loaded on the given connection. Is it possible that new connections are being used before loading the extension in your setup?

Thank you! Highly unlikely to be honest, that's why I'm very puzzled. I will give it another pass though.

sinkingsugar commented 5 months ago

I found a possible cause indeed. Closing this for now! I will try to repro the iOS issue soon as well.

tantaman commented 5 months ago

I found an issue that impacted WASM and could have caused this. I'll be publishing the fix in 0.16.3

Did you ever track down the problem on your end?