> I expect process B able to
> read the old data and displays appropriately. But, process B seems to be
> blocked. Why is this so as I thought SQLite handle concurrency as in this
> case where there are multiple reads and one single write ?
>
After Pavel's explanation just reread
http://www.s
It's not clear what locks did you want to show with your diagram but
in reality locks would be held as following:
*Process A*: Begin Transaction - no lock
*Process B*: Select DB1 <-- shared lock
*Process A*: Insert DB1 <-- if insert is small then only reserved lock
*Process B*: Select DB1 <-- sha
Hi,
Is the locking states shown below for DB1 correct ?
*Process A*
*Process B*
Begin Transaction
Insert DB1<-- Reserved lock
Select DB1<-- Shared lock
Insert DB1
:
after 10 Inserts and 10 Selects
Select DB1<-- Shared lock
:
Continue Inserts and
>
> > SQLite allows multiple readers OR a single writer to access the database
> simultaneously.
> From the SQLite doc, as long as no transaction is pending, other process
> can
> read or obtain reserved lock for write.
>
the docs say: "Locks are not acquired until the first read or write
operatio
> What made you expect that?
Process A has not entered the exclusive lock and so process B can obtain
shared lock to read.
> SQLite allows multiple readers OR a single writer to access the database
simultaneously.
>From the SQLite doc, as long as no transaction is pending, other process can
read o
nyetngoh wong wrote:
> First, I've a process A that do many inserts to the database and reads back
> from the database to verify. The writes are done in one DEFERRED transaction
> as data are not committed yet. While the first process running, another
> process B is launched to read from the databa
Hi,
First, I've a process A that do many inserts to the database and reads back
from the database to verify. The writes are done in one DEFERRED transaction
as data are not committed yet. While the first process running, another
process B is launched to read from the database for display purposes.
7 matches
Mail list logo