On Fri, Feb 10, 2012 at 9:01 AM, Marc L. Allen
<mlal...@outsitenetworks.com>wrote:

> I'm not sure I'm even following how this scenario can happen.  Doesn't
> App1 have a Shared lock on the DB?  Doesn't App2 require an Exclusive lock
> before it can update something?
>

The OP is running in WAL mode.  Different rules apply.  In WAL mode, you
can have multiple simultaneous readers concurrently with a single writer.
And the readers all see (possibly different) snapshots of the database from
the point in time where their read transaction was first started.



>
> When given the initial scenario, I thought that Step 5 would block waiting
> for App1 to finalize.
>
> > -----Original Message-----
> > From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-
> > boun...@sqlite.org] On Behalf Of Simon Slavin
> > Sent: Friday, February 10, 2012 8:55 AM
> > To: General Discussion of SQLite Database
> > Subject: Re: [sqlite] Database locked in multi process scenario
> >
> >
> > On 10 Feb 2012, at 1:52pm, Sreekumar TP wrote:
> >
> > > In the real code, there is no sleep/wait or pause. It so happens that
> > > the write of the app2 is scheduled in between.
> > >
> > > What you are suggesting is that at any point of time only one process
> > > can have a transaction open in a database?
> >
> > I understand your question but I don't know enough of the internals of
> > SQLite to answer it.  Also, I'm not sure how the time between the first
> > _step() and the step which returns 'no more data' resembles a
> > transaction.  I hope someone who knows more than I do will contribute.
> >
> > Simon.
> > _______________________________________________
> > sqlite-users mailing list
> > sqlite-users@sqlite.org
> > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



-- 
D. Richard Hipp
d...@sqlite.org
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to