Subject | Transactions - Writer block reader? |
---|---|
Author | Gabor Boros |
Post date | 2016-08-23T15:22:49Z |
Hi All,
I have a table: CREATE TABLE TBL_TRA_TEST(ID BIGINT);
and want to write to it and read from it concurrently.
For this task I use two transactions (read_committed, no_rec_version,
wait), one with "write" parameter and one with "read".
After started the "write" transaction execute: INSERT INTO TBL_TRA_TEST
(ID) VALUES (1);
then start the "read" transaction and execute: SELECT * FROM TBL_TRA_TEST
the result is:
"deadlock
read conflicts with concurrent update
concurrent transaction number is ..."
For me this is looks like a bug.
If separate the two ("write", "read") transactions into two attachments
the "read" transaction waiting forever. Is this the normal behavior? A
"read committed read only" transaction cannot read from a table if a
writer transaction working on it?
The above things tried with the recent snapshot of 3.0.
Gabor
I have a table: CREATE TABLE TBL_TRA_TEST(ID BIGINT);
and want to write to it and read from it concurrently.
For this task I use two transactions (read_committed, no_rec_version,
wait), one with "write" parameter and one with "read".
After started the "write" transaction execute: INSERT INTO TBL_TRA_TEST
(ID) VALUES (1);
then start the "read" transaction and execute: SELECT * FROM TBL_TRA_TEST
the result is:
"deadlock
read conflicts with concurrent update
concurrent transaction number is ..."
For me this is looks like a bug.
If separate the two ("write", "read") transactions into two attachments
the "read" transaction waiting forever. Is this the normal behavior? A
"read committed read only" transaction cannot read from a table if a
writer transaction working on it?
The above things tried with the recent snapshot of 3.0.
Gabor