[sqlite] Shared cache mode and busy wait

2017-03-16 Thread Bob Friesenhahn
Today I saw a APSW note about shared cache mode at "https://rogerbinns.github.io/apsw/tips.html#shared-cache-mode;, which led me to "https://sqlite.org/src/tktview/ebde3f66fc64e21e61ef2854ed1a36dfff884a2f;. Reading the sqlite page at "https://sqlite.org/sharedcache.html; I see that section

[sqlite] Shared-Cache Mode

2014-05-17 Thread gwenn
Hello, Is there any way to known if one connection participate to shared-cache mode ? I've read http://sqlite.org/sharedcache.html which specifies how to set but not how to get the mode! Regards. ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] shared cache mode and 'LOCKED'

2009-10-29 Thread O'Neill, Owen
- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of John Crenshaw Sent: Thursday, October 29, 2009 5:49 AM To: General Discussion of SQLite Database Subject: Re: [sqlite] shared cache mode and 'LOCKED' Let's say we have the three connections

Re: [sqlite] shared cache mode and 'LOCKED'

2009-10-28 Thread John Crenshaw
hn -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Tom Broadbent Sent: Wednesday, October 28, 2009 6:33 PM To: General Discussion of SQLite Database Subject: Re: [sqlite] shared cache mode and 'LOCKED' i guess this isn't that compli

Re: [sqlite] shared cache mode and 'LOCKED'

2009-10-28 Thread Tom Broadbent
...@sqlite.org] On Behalf Of John Crenshaw Sent: Wednesday, October 28, 2009 12:49 PM To: General Discussion of SQLite Database Subject: Re: [sqlite] shared cache mode and 'LOCKED' Almost. Locking happens at a table level in this case, not a database level. Three different threads can all write

Re: [sqlite] shared cache mode and 'LOCKED'

2009-10-28 Thread John Crenshaw
Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Tom Broadbent Sent: Wednesday, October 28, 2009 3:46 PM To: General Discussion of SQLite Database Subject: Re: [sqlite] shared cache mode and 'LOCKED' oh, right. my bad. i don't mean to share

Re: [sqlite] shared cache mode and 'LOCKED'

2009-10-28 Thread Tom Broadbent
. is this right? -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of John Crenshaw Sent: Wednesday, October 28, 2009 12:38 PM To: General Discussion of SQLite Database Subject: Re: [sqlite] shared cache mode and 'LOCKED' I don't know

Re: [sqlite] shared cache mode and 'LOCKED'

2009-10-28 Thread John Crenshaw
n, because otherwise contention is too great. John -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Tom Broadbent Sent: Wednesday, October 28, 2009 3:32 PM To: General Discussion of SQLite Database Subject: Re: [sqlite] shared

Re: [sqlite] shared cache mode and 'LOCKED'

2009-10-28 Thread Tom Broadbent
: Wednesday, October 28, 2009 12:32 PM To: General Discussion of SQLite Database Subject: Re: [sqlite] shared cache mode and 'LOCKED' to be clear... "in other words, two threads sharing a connection in shared cache mode will always cause SQLITE_LOCKED (rather than SQLITE_BUSY) when conte

Re: [sqlite] shared cache mode and 'LOCKED'

2009-10-28 Thread John Crenshaw
It appears to be up to date. John -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of O'Neill, Owen Sent: Wednesday, October 28, 2009 1:45 PM To: General Discussion of SQLite Database Subject: [sqlite] shared cache mode

[sqlite] shared cache mode and 'LOCKED'

2009-10-28 Thread O'Neill, Owen
Hi Everyone, Does anyone know if this page is still up to date with respect to when you get "SQLITE_LOCKED" when operating in shared cache mode ? http://www.sqlite.org/cvstrac/wiki?p=DatabaseIsLocked (I'm trying to solve a two writers problem and am trying to understand the best way to solve

[sqlite] Shared-cache mode doc page needs a version

2009-03-23 Thread Dennis Volodomanov
On this page: http://sqlite.org/sharedcache.html in item 3.0 there's a missing version number at the end of the last sentence. Best regards, Dennis ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] shared cache mode locking

2007-12-21 Thread Ken
So did my post. We are talking about the same thing. Definately confusing, at least to me.. The problem exists wherein you have two shared connections and one connection performs a begin exclusive... The other connection was just ignoring the exclusivity lock and continuing on its merry way

Re: [sqlite] shared cache mode locking

2007-12-21 Thread Ed Pasma
No, you did not confuse me. We are talking about different things it appears. My post refers to the shared-cache locking model (http:// sqlite.org/sharedcache.html). The document is clear by itself. What makes it confusing, is that a shared cache instance exist as a single normal connection

Re: [sqlite] shared cache mode locking

2007-12-21 Thread Ken
Ed, Sorry if I confused you, a "Write" lock is really an EXCLUSIVE lock per sqlite documentation. I used the two interchangeably, pardon my error. A begin exclusive indicates the beginning of a transaction, It escalates the database lock to an EXCLUSIVE lock. The begin transaction does not

Re: [sqlite] shared cache mode locking

2007-12-21 Thread Ed Pasma
The ticket has already been resolved, I see. So it has been considered a bug. In my earlier reply I tried to defend the current behavour to be in line with the document, http://sqlite.org/ sharedcache.html. I'm happy to change my mind now. Only I miss something in the model as described in

Re: [sqlite] shared cache mode locking

2007-12-20 Thread Ken
Ed, Dan opened a ticket. I agree the documentation isn't clear on the Exlusive locking state. Not really sure, if this is by design or a bug at this stage. I do think its a great feature of the Shared cache mode to allow table level locking. But I'm curious with this table level locking what

Re: [sqlite] shared cache mode locking

2007-12-20 Thread Ed Pasma
Hello,` Empirically I found that it is exactly true. Must admit I'm confused but may it is in line with the Shared-Cache locking model. This does not mention the EXCLUSIVE locking state. The most 'secure' locking state it mentions is a write-transaction and this can coexist with

Re: [sqlite] shared cache mode locking

2007-12-19 Thread Ken
Some additional info: when the sqlite_lock is returned there is another thread that appears to be reading the same table. Does the sqlite3 step return sqlite_locked in this case? Thanks, Ken Ken <[EMAIL PROTECTED]> wrote: While using the new 3.5.4 sqlite3_enable_shared_cache I ran into a

[sqlite] shared cache mode locking

2007-12-19 Thread Ken
While using the new 3.5.4 sqlite3_enable_shared_cache I ran into a strange lock situation. SQLITE_LOCK is returned from an insert statement, even though the thread/connection performed a successful "begin exclusive" transaction. begin exclusive insert into

Re: [sqlite] Shared cache mode issue

2007-01-09 Thread Dan Kennedy
On Tue, 2007-01-09 at 08:01 -0800, Peter James wrote: > On 1/9/07, Dan Kennedy <[EMAIL PROTECTED]> wrote: > But it looks to me like commit #3341 (August 2006) covers this > up. #3341 > changes things so that the shared-schema is reset whenever any > connection

Re: [sqlite] Shared cache mode issue

2007-01-09 Thread Dan Kennedy
On Mon, 2007-01-08 at 16:03 -0800, Peter James wrote: > Hey folks... > > The context of this message is sqlite library version 3.3.6, using the > shared-cache mode, effectively following the test_server.c example. > Immediately upon switching to shared-cache mode we started seeing errors > like

Re: [sqlite] Shared cache mode issue

2007-01-08 Thread Jay Sprenkle
On 1/8/07, Peter James <[EMAIL PROTECTED]> wrote: Thanks for your response, Ken. I'm not sure I've explained myself properly. It's not that I'm calling sqlite3_enable_shared_cache() multiple times. It's that if I don't maintain a persistent connection while the server is running I end up with

Re: [sqlite] Shared cache mode issue

2007-01-08 Thread Peter James
On 1/8/07, Ken <[EMAIL PROTECTED]> wrote: You could always implement a sqlite3_open call and store it in the g variable, and close it when the server quits. Thanks for your response, Ken. I'm not sure I've explained myself properly. It's not that I'm calling sqlite3_enable_shared_cache()

Re: [sqlite] Shared cache mode issue

2007-01-08 Thread Ken
Here is a code snipet from my version if the server thread code I found that it was doing an enable/disable on the shared cache with the original logic. You could always implement a sqlite3_open call and store it in the g variable, and close it when the server quits. void

Re: [sqlite] shared-cache mode and firefox

2006-12-06 Thread Jay Sprenkle
Thanks Vitali, and Trevor. I'll poke them instead ;) > Firefox is now using sqlite. They use shared-cache mode because they want it > to work over networked drives and they don't want to pay for the > latency involved. The "shared cache mode" in sqlite only changes certain behavior for threads

Re: [sqlite] shared-cache mode and firefox

2006-12-06 Thread Trevor Talbot
On 12/6/06, Jay Sprenkle <[EMAIL PROTECTED]> wrote: Firefox is now using sqlite. They use shared-cache mode because they want it to work over networked drives and they don't want to pay for the latency involved. The "shared cache mode" in sqlite only changes certain behavior for threads in

Re: [sqlite] shared-cache mode and firefox

2006-12-06 Thread Vitali Lovich
http://www.sqlite.org/sharedcache.html It's controlled at runtime by the function int sqlite3_enable_shared_cache(int); Thus that behaviour is probably controlled by Firefox (assuming it uses a version of sqlite with cache support compiled in). You'd have to ask them. Jay Sprenkle wrote:

[sqlite] shared-cache mode and firefox

2006-12-06 Thread Jay Sprenkle
Good evening, I'd like to make a request for the next version of sqlite. It's a big change and will probably get shot down, but you won't know until you ask. Firefox is now using sqlite. They use shared-cache mode because they want it to work over networked drives and they don't want to pay for

Re: [sqlite] sqlite shared-cache mode usage

2006-08-29 Thread Jay Sprenkle
As you can tell from this forum, locking and synchronization is the area where there is least intuitive understanding among users and is the most consistent source of problems. There must be a deep psychological reason. I don't think it's deep really, just the most complex part to understand.

Re: [sqlite] sqlite shared-cache mode usage

2006-08-29 Thread John Stanton
Jay Sprenkle wrote: On 8/29/06, John Stanton <[EMAIL PROTECTED]> wrote: Thankyou. The Firefox people have merely removed their dependance upon an unreliable resource, cross OS file locking. A prudent design choice. If they come up with an elegant distributed lock protocol it would be worth

Re: [sqlite] sqlite shared-cache mode usage

2006-08-29 Thread Jay Sprenkle
On 8/29/06, John Stanton <[EMAIL PROTECTED]> wrote: Thankyou. The Firefox people have merely removed their dependance upon an unreliable resource, cross OS file locking. A prudent design choice. If they come up with an elegant distributed lock protocol it would be worth propagating

Re: [sqlite] sqlite shared-cache mode usage

2006-08-29 Thread John Stanton
Thankyou. The Firefox people have merely removed their dependance upon an unreliable resource, cross OS file locking. A prudent design choice. If they come up with an elegant distributed lock protocol it would be worth propagating universally in the light of the success of Firefox and its

Re: [sqlite] sqlite shared-cache mode usage

2006-08-29 Thread Martin Jenkins
Ritesh Kapoor wrote: Can you - DRH or someone else provide some more background information on why locking dosen't work on NFS mounted file systems. I just tried to find out what the locking problem was but couldn't find a web page discussing it in any detail. Lots of pages saying there *was*

Re: [sqlite] sqlite shared-cache mode usage

2006-08-29 Thread drh
"Jay Sprenkle" <[EMAIL PROTECTED]> wrote: > > If you run two instances of firefox you trash > your own database. No, you didn't read what I said. Firefox implements their own locking mechanism, so two instances of firefox will play nicely together. The problem is when some other application,

Re: [sqlite] sqlite shared-cache mode usage

2006-08-29 Thread Jay Sprenkle
On 8/29/06, Ritesh Kapoor <[EMAIL PROTECTED]> wrote: Can you - DRH or someone else provide some more background information on why locking dosen't work on NFS mounted file systems. If its a known issue then is there an SQLite compile time option that would remove locking - i couldn't find one.

Re: [sqlite] sqlite shared-cache mode usage

2006-08-29 Thread Jay Sprenkle
On 8/29/06, John Stanton <[EMAIL PROTECTED]> wrote: Jay Sprenkle wrote: > > If it breaks because of something you did, then YOU are the bum. > If it's broken because of the operating system THEY are the bums. > Having someone to blame still doesn't make it work. They are have made the rational

Re: [sqlite] sqlite shared-cache mode usage

2006-08-28 Thread Ritesh Kapoor
sting times..." --- Begin Message --- "Jay Sprenkle" <[EMAIL PROTECTED]> wrote: > Good morning all, > > I'm in the design stage of a project and had a question about sqlite > shared-cache mode. > The new version of firefox will use mozStorage, which is based on >

Re: [sqlite] sqlite shared-cache mode usage

2006-08-28 Thread John Stanton
Jay Sprenkle wrote: The problem is that they have to work on broken operating systems. I don't know of another way to patch around the problem. Do you? nope. If it breaks because of something you did, then YOU are the bum. If it's broken because of the operating system THEY are the bums.

Re: [sqlite] sqlite shared-cache mode usage

2006-08-28 Thread Jay Sprenkle
The problem is that they have to work on broken operating systems. I don't know of another way to patch around the problem. Do you? nope. If it breaks because of something you did, then YOU are the bum. If it's broken because of the operating system THEY are the bums.

Re: [sqlite] sqlite shared-cache mode usage

2006-08-28 Thread drh
"Jay Sprenkle" <[EMAIL PROTECTED]> wrote: > On 8/28/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Let me emphasize that everything in the previous paragraph is > > hearsay and supposition and could be wildly incorrect. > > Thanks Dr.H. > > I hope it's not true. If it's true It really

Re: [sqlite] sqlite shared-cache mode usage

2006-08-28 Thread drh
"Jay Sprenkle" <[EMAIL PROTECTED]> wrote: > Good morning all, > > I'm in the design stage of a project and had a question about sqlite > shared-cache mode. > The new version of firefox will use mozStorage, which is based on > sqlite using shared-cache mode. I wan

AW: [sqlite] sqlite shared-cache mode usage

2006-08-28 Thread Marc Ruff
in advance. Marc Ruff -Ursprüngliche Nachricht- Von: Jay Sprenkle [mailto:[EMAIL PROTECTED] Gesendet: Sonntag, 27. August 2006 19:07 An: sqlite-users@sqlite.org Betreff: [sqlite] sqlite shared-cache mode usage Good morning all, I'm in the design stage of a project and had a question

[sqlite] sqlite shared-cache mode usage

2006-08-27 Thread Jay Sprenkle
Good morning all, I'm in the design stage of a project and had a question about sqlite shared-cache mode. The new version of firefox will use mozStorage, which is based on sqlite using shared-cache mode. I want other programs to be able read/write to the database but I was told this might