Highlighted

How to open SQLite database with an Exclusive lock?

New Here ,
Feb 20, 2014

Copy link to clipboard

Copied

Hello,

with the growing number of people using Dropbox, we are seeing an increase in Runtime errors in our desktop AIR applications when writing to SQLite databases.

Occasionally an SQLError is thrown while writing to the database. This is happening randomly, with thousands of users without a pattern.  After many hours investigating, we've discovered that it's Dropbox fault - every small change to a sqlite database, triggers Dropbox sync mechanism, which locks the sqlite database. If AIR tries to write in the database while Dropbox is synching, an error is thrown.

This is a known issue of dropbox: http://superuser.com/questions/591930/dropbox-options-for-avoiding-file-conflicts-and-locking-issues , that, I believe, could be avoided if one could lock the SQLlite database with an Exclusive lock.

According to AIR documentation, it seems there's no option to open an SQL lite database with an Exclusive lock, which apparently would avoid this nasty issue.

Am I missing something ?

TOPICS
Development

Views

528

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

How to open SQLite database with an Exclusive lock?

New Here ,
Feb 20, 2014

Copy link to clipboard

Copied

Hello,

with the growing number of people using Dropbox, we are seeing an increase in Runtime errors in our desktop AIR applications when writing to SQLite databases.

Occasionally an SQLError is thrown while writing to the database. This is happening randomly, with thousands of users without a pattern.  After many hours investigating, we've discovered that it's Dropbox fault - every small change to a sqlite database, triggers Dropbox sync mechanism, which locks the sqlite database. If AIR tries to write in the database while Dropbox is synching, an error is thrown.

This is a known issue of dropbox: http://superuser.com/questions/591930/dropbox-options-for-avoiding-file-conflicts-and-locking-issues , that, I believe, could be avoided if one could lock the SQLlite database with an Exclusive lock.

According to AIR documentation, it seems there's no option to open an SQL lite database with an Exclusive lock, which apparently would avoid this nasty issue.

Am I missing something ?

TOPICS
Development

Views

529

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Feb 20, 2014 0

Have something to add?

Join the conversation