Re: [sqlite] Any way to debug which query/connection is holding a share lock?

2014-06-14 Thread RSmith
On 2014/06/14 02:00, Sohail Somani wrote: I think I'm pretty certain that my program *is* the culprit. I'd like to add the tracing to SQLite itself. Which functions do you suggest? I know you mentioned opening/closing so that would be sqlite3_open* and sqlite3_finalize? Just to clarify,

Re: [sqlite] Any way to debug which query/connection is holding a share lock?

2014-06-13 Thread Sohail Somani
On 13/06/2014 4:38 PM, RSmith wrote: If none of these finds you a culprit, it means your program is the only thing left to blame. Here we need to start with logging every time you create a connection and start a query or creating a prepared statement. Log the handles or object IDs you get back

Re: [sqlite] Any way to debug which query/connection is holding a share lock?

2014-06-13 Thread RSmith
On 2014/06/13 17:38, Sohail Somani wrote: Thanks for your response. I had been trying to avoid the "writing little bits" over time to avoid an inconsistent state in the case of a crash or user exit, but the inconsistency is not that big of a deal as the data integrity is still there and

Re: [sqlite] Any way to debug which query/connection is holding a share lock?

2014-06-13 Thread Sohail Somani
On 13/06/2014 11:04 AM, RSmith wrote: On 2014/06/13 15:02, Sohail Somani wrote: My application's architecture looks roughly like this: - A main thread which does only database reads - A dedicated database write thread I needed to create this because while reads are fast, there are occasions

Re: [sqlite] Any way to debug which query/connection is holding a share lock?

2014-06-13 Thread RSmith
On 2014/06/13 15:02, Sohail Somani wrote: My application's architecture looks roughly like this: - A main thread which does only database reads - A dedicated database write thread I needed to create this because while reads are fast, there are occasions where writes take a significant

[sqlite] Any way to debug which query/connection is holding a share lock?

2014-06-13 Thread Sohail Somani
Hi, My application's architecture looks roughly like this: - A main thread which does only database reads - A dedicated database write thread I needed to create this because while reads are fast, there are occasions where writes take a significant portion of time and that can cause the main