On 10/4/2017 10:17 PM, Hegde, Deepakakumar (D.) wrote:
There is a problem we are facing with the multiple DB process write operation.
Following the procedure:
1) Open the Database in the two process as:
sqlite3_open_v2 (pcDbName, &psRaceSqlite->sSqliteInfo.pSqlHandle,
(SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_FULLMUTEX), NULL);
2) Both the link are added the busy handler and busy handler function is
retries for 10000 times with 10ms second of delay.
3) In one thread there is a continuous record insertion with begin and commit
operation. This begin and commit will be done with for every 200 record
insertion. time for a single begin to the commit is about 1 second.
Use BEGIN IMMEDIATE or BEGIN EXCLUSIVE here. For rationale, see
the paragraph that mentions "deadlock". Also
http://sqlite.org/lang_transaction.html and http://sqlite.org/lockingv3.html
sqlite-users mailing list