Re: [sqlite] Reader locks writer in truncate mode?

2014-03-14 Thread veeresh kumar
I should have been more specific. There are lots of threads, Identifying which thread is having the lock at any given time would have been helpful. Also need clarification on this one - A reader thread should still be able to read data from database until writer thread in transaction tries to

Re: [sqlite] Reader locks writer in truncate mode?

2014-03-13 Thread Simon Slavin
On 13 Mar 2014, at 11:12pm, veeresh kumar wrote: > Thanks a lot for the response. Is there any way to identify which > thread/process is actually blocking the reader thread or vise versa? Only in that it's the one that didn't get the error message. The one that's in the

Re: [sqlite] Reader locks writer in truncate mode?

2014-03-13 Thread veeresh kumar
, 2014 2:30 PM To: General Discussion of SQLite Database Subject: Re: [sqlite] Reader locks writer in truncate mode?     On 13 Mar 2014, at 9:27pm, Igor Tandetnik <i...@tandetnik.org> wrote:   > On 3/13/2014 5:24 PM, veeresh kumar wrote: >> In a multi-threaded application, say a reader

Re: [sqlite] Reader locks writer in truncate mode?

2014-03-13 Thread Igor Tandetnik
On 3/13/2014 5:24 PM, veeresh kumar wrote: In a multi-threaded application, say a reader thread has read 100 records from the table and reading is still in progress before which writer thread writes data and tries to commit. Its causing database lock.Is this expected? Assuming the two

[sqlite] Reader locks writer in truncate mode?

2014-03-13 Thread veeresh kumar
In a multi-threaded application, say a reader thread has read 100 records from the table and reading is still in progress before which writer thread writes data and tries to commit. Its causing database lock.Is this expected? Note : journal_mode is set as truncate

Re: [sqlite] Reader locks writer in truncate mode?

2014-03-13 Thread Simon Slavin
On 13 Mar 2014, at 9:27pm, Igor Tandetnik wrote: > On 3/13/2014 5:24 PM, veeresh kumar wrote: >> In a multi-threaded application, say a reader thread has read 100 records >> from the table and reading is still in progress before which writer thread >> writes data and tries