dbTalk Databases Forums  

Unrepeatable Read: why a problem

comp.databases comp.databases


Discuss Unrepeatable Read: why a problem in the comp.databases forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Ravi
 
Posts: n/a

Default Unrepeatable Read: why a problem - 04-27-2007 , 10:16 AM






Suppose I've got a part of schedule as:
....
T1 : Read(X)
T2 : Write(X)
T1 : Read(X)
....

We call this unrepeatable read problem as T1 does not get the same
value of X.
But I've got an objection. Why see it as a problem? Our operations may
want us to make T1 read the value of X overwritten by another
operation (ACID violation).

Then why would any transaction would read the data again, and moreover
would like to see the same data which was already with it in the
buffer.
Doesn't make sense.


Reply With Quote
  #2  
Old   
Ed Prochak
 
Posts: n/a

Default Re: Unrepeatable Read: why a problem - 04-27-2007 , 12:48 PM






On Apr 27, 11:16 am, Ravi <ra.ravi.... (AT) gmail (DOT) com> wrote:
Quote:
Suppose I've got a part of schedule as:
...
T1 : Read(X)
T2 : Write(X)
T1 : Read(X)
...

We call this unrepeatable read problem as T1 does not get the same
value of X.
But I've got an objection. Why see it as a problem? Our operations may
want us to make T1 read the value of X overwritten by another
operation (ACID violation).

Then why would any transaction would read the data again, and moreover
would like to see the same data which was already with it in the
buffer.
Doesn't make sense.
Consider refresh of a web page? Actually refresh from any client that
does not or cannot retain all the selected data.

If you want to read dirty data, go ahead. But there is a reason why
it's called "dirty data".

Ed



Reply With Quote
  #3  
Old   
David Cressey
 
Posts: n/a

Default Re: Unrepeatable Read: why a problem - 04-27-2007 , 01:30 PM




"Ravi" <ra.ravi.rav (AT) gmail (DOT) com> wrote

Quote:
Suppose I've got a part of schedule as:
...
T1 : Read(X)
T2 : Write(X)
T1 : Read(X)
...

We call this unrepeatable read problem as T1 does not get the same
value of X.
But I've got an objection. Why see it as a problem? Our operations may
want us to make T1 read the value of X overwritten by another
operation (ACID violation).

Then why would any transaction would read the data again, and moreover
would like to see the same data which was already with it in the
buffer.
Doesn't make sense.

Better you should ask, why wouldn't it be a problem?

If you want a new value for X, then you want to do it in the context of a
new transaction.

T1 : Read(X)
T2 : Write(X)
T3 : Read(X)

Now T3 can look at the new value of X without raising aconsistency problem.

As to why a transaction might read the same data twice, it's not always
obvious what data an action ends up reading.






Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.