mfp / ocaml-sqlexpr

Minimalistic syntax extension for type-safe, convenient execution of SQL statements.
Other
86 stars 17 forks source link

busy handler not working #39

Open vbmithr opened 5 years ago

vbmithr commented 5 years ago

Even though I set_retry_on_busy, I get my program crashing with BUSY exceptions. Haven't taken the time to investigate further for now. Edit: This does not happen in a trivial test.

mfp commented 5 years ago

On Wed, Dec 12, 2018 at 10:13:03AM -0800, Vincent Bernardoff wrote:

Even though I set_retry_on_busy, I get my program crashing with BUSY exceptions. Haven't taken the time to investigate further for now.

I'm looking into this. Which instantiation did you get this with? Sqlexpr_sqlite_lwt?

-- Mauricio Fernández

mfp commented 5 years ago

OK, I found a likely culprit (if you are using Sqlexpr_sqlite_lwt, that is). I cannot reproduce this reliably, so I'd be grateful if you could apply this and check with your application (you can pin to the bugfix/busy-error branch): https://github.com/mfp/ocaml-sqlexpr/commit/98288b4169593e14327bba532551676e3e053cfd#diff-cd6d3fb43a1caf3a53cda676f4274418R485

If you're using a different module, though, further search will be required.

vbmithr commented 5 years ago

Yes I'm using the Lwt specialization of sqlexpr.

vbmithr commented 5 years ago

I switch to WAL so I did not get those errors anymore. I'll try to find the time to test your patch.

vbmithr commented 5 years ago

Now I have another error: I never go out the busy loop… :( I tried the patch with no avail.