![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
As per the definition: Serializable isolation prevents: dirty read, nonrepeatable read, and phantom read. Using MS SQL query analyzer, I have two windows and I excute as follows. Window1 (w1) start tran w2 start tran w1 set transaction isolation level serializable w2 set transaction isolation level serializable w1 select * from sometable where id = 5 w2 select * from sometable where id = 5 ( as per my understanding ) this second select should not go through. But the second select is able to read the data. It doesn't block!!! I get the same result with IBM db2 also. Am I missing something..here.??? |
|
This is a problem I am finding using EJB and it would really help if someone could explain the gap to me. Thanks in advance for your help. Misos |
#3
| |||
| |||
|
|
I'm not sure if MS SQL conforms to the ISO standard for serializable, but typically reads don't block reads in a serializable schedule. If w1 was a write/update operation, it would block w2. |
#4
| |||
| |||
|
|
"misos" <misos8 (AT) yahoo (DOT) com> wrote in message news:928b2f70.0408051808.33aa0856 (AT) posting (DOT) google.com... As per the definition: Serializable isolation prevents: dirty read, nonrepeatable read, and phantom read. Using MS SQL query analyzer, I have two windows and I excute as follows. Window1 (w1) start tran w2 start tran w1 set transaction isolation level serializable w2 set transaction isolation level serializable w1 select * from sometable where id = 5 w2 select * from sometable where id = 5 ( as per my understanding ) this second select should not go through. But the second select is able to read the data. It doesn't block!!! I get the same result with IBM db2 also. Am I missing something..here.??? I'm not sure if MS SQL conforms to the ISO standard for serializable, but typically reads don't block reads in a serializable schedule. If w1 was a write/update operation, it would block w2. This is a problem I am finding using EJB and it would really help if someone could explain the gap to me. Thanks in advance for your help. Misos - Dan |
#5
| ||||
| ||||
|
|
Hello, Using Weblogic 6.1, CMP , I am setting the isolation level to "serializable" and concurrency strategy to "Database" but when two transactions are happening as: Transaction 1 ( t1) does a select on a row Transaction 2 (t2) does a select on the same row ( this select is going through ) As I stated before, this example does not violate the serializable isolation |
|
The reason begin, most of the database ( currently I am using MS SQLServer 2000 and db2 ) , they use optimistic locking even if we specify serializable, |
|
goes into a deadlock and one of them will proceed and the other to fail as deadlock victim. |
|
With Weblogic 6.1 , is there anyway we can prevent the second select from going through. ( meaning it should go into a blocking state and shouldn't get any lock ...something like as if the SELECTs were done using "SELECT ...FOR UPDATE") ? |
#6
| |||
| |||
|
|
"Dan" <guntermann (AT) verizon (DOT) com> wrote in message news:Q8GQc.2199$7z.306 (AT) nwrddc01 (DOT) gnilink.net... I'm not sure if MS SQL conforms to the ISO standard for serializable, but typically reads don't block reads in a serializable schedule. If w1 was a write/update operation, it would block w2. I don't know the ISO standard, but what Dan described is exactly the way DEC Rdb/VMS worked, from some 20 years ago onward. This is how Rdb worked if both w1 and w2 were locking transactions. In addition, DEC Rdb/VMS had a special kind of read only transaction called a "snapshot" transaction. In a snapshot read only transaction, updaters maintain a before image of the update, tagged so that the snapshot transaction will use the data as it looked at the time of the snapshot. In Dan's scenario, w2 would not be blocked by the operation of w1, but it would be limited to seeing the data prior to w1's action. It's my understanding that snapshots are serializable. |
| - Dan |
#7
| |||
| |||
|
|
Very interesting. They had something similar to multiversion time-ordering algorithms implemented in DEC Rdb 20 years ago? I was not aware of that. |
![]() |
| Thread Tools | |
| Display Modes | |
| |