SQLite.NET PCL Busy Exception

We use SQLite.NET PCL in the Xamarin application.

When placing the database under pressure, inserting it into several tables, we see that exceptions from BUSY are excluded.

Can anyone explain what the difference is between BUSY and LOCKED? And what makes the BASE BE?

Our code uses one connection to a database created using the following code:

var connectionString = new SQLiteConnectionString(GetDefaultConnectionString(), 
                                                      _databaseConfiguration.StoreTimeAsTicks);
var connectionWithLock = new SQLiteConnectionWithLock(new SQLitePlatformAndroid(), connectionString);

return new SQLiteAsyncConnection (() => { return connectionWithLock; });
+4
source share
2 answers

, , , , , , , , . , ,

:

, , , .

, , , , .

+4

... , ...

, async - , , , . , . , , FIFO . , X , Exception.

SQLiteBusyException - , , SQLite SQLITE_BUSY SQLITE_IOERR_BLOCKED. , , .

SQLiteConnection.setBusyTimeout(long), SQLite , .

: http://www.sqlite.org/lockingv3.html

: http://sqlite.org/capi3ref.html#sqlite3_busy_timeout

+1

Source: https://habr.com/ru/post/1655090/


All Articles