Low level record retrieval and concurrency issue.

From: Kevin <srandm_at_yahoo.com>
Date: 8 Feb 2003 22:22:43 -0800
Message-ID: <94823ca8.0302082222.2b384d5b_at_posting.google.com>



Suppose a record is identified by the record id (rid). One thread (thread1) retrieves this record from the buffer manager through a byte array pointer. Another thread (thread2) also retrieves the same record. Now if thread2 modifies the record i.e. updates it information and the buffer manager updates the record, r1 then starts the read the data from the byte array pointer, then thread1 might read invalid data, possibly corrupted date, etc.

How does rdbms deal with this? Do they use byte array pointer to the buffer manager or do they actually copy the entire data into a new byte array and return that to the client to avoid this issue?

Please give some advice. Thanks

Kevin Received on Sun Feb 09 2003 - 07:22:43 CET

Original text of this message