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

George Shimanovich george.shimanovich at indexengines.com
Tue Jul 11 20:51:11 GMT 2017


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.

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,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scsys.co.uk/pipermail/dbd-sqlite/attachments/20170711/d0242e60/attachment.htm>

More information about the DBD-SQLite mailing list