[DBD-SQLite] adding support ot busy handler support in DBD::SQLite

Kenichi Ishigaki kishigaki at gmail.com
Wed Jul 12 06:26:02 GMT 2017


Hi

2017-07-12 5:51 GMT+09:00 George Shimanovich
<george.shimanovich at indexengines.com>:
> Hello,
>
>
> Current implementation of DBD::SQLite supports busy timeout
> (sqlite_busy_timeout), but not busy handler.
>
>
> sqlite3's busy handler (sqlite3_busy_handler) offers alternative way to deal
> with busy timeout (sqlite3_busy_timeout).
>
> For example, it allows one to implement infinite busy timeout with a
> callback used to identify (e.g. once a minute) process holder of write lock
> to the database. With busy timeout the caller needs to implement retry logic
> for every query, which is cumbersome.
>
>
> Are there plans to add support to busy handler?
>
>
> I am thinking of implementing driver private method sqlite_busy_handler and
> will welcome any insights. Perhaps I am missing something.
>

Pull requests are always welcome :)

Cheers,
Kenichi

>
> I considered using sqlite_progress_handler but can't implement the above
> busy handler functionality using it, as there is no way to determine that
> database is busy. Plus sleeping in progress handler defeats its purpose and
> causes delay.
>
>
> Thank you,
>
> George
>
>
> _______________________________________________
> DBD-SQLite mailing list
> DBD-SQLite at lists.scsys.co.uk
> http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbd-sqlite
>



More information about the DBD-SQLite mailing list