
System Architecture 2-45
Managing Shared-Memory Resources
The blobtimestamp onthe disk page changes each time theblob dataon the
page is overwritten. The blob timestamp stored with the forward pointer
changeseachtimeanewblobreplacestheoldblob.Forexample,whenablob
in a data row is updated, the new blob is stored on disk, and the forward
pointerstoredwiththeblobdescriptorisrevisedtopointtothenewlocation.
The blob timestamp in the data row is updated and synchronized with the
blobtimestamponthenewblob’sdiskpage.Theblobtimestamp onthenow-
obsolete disk page is no longer synchronized. (An illustration of blobspace
blob storage shows this in Figure 2-39 on page 2-150.)
Because retrieving a blob can involve large amounts of data, it might be
impossible to retrieve the blob data simultaneously with the rest of the row
data. Coordination is needed for blob reads that OnLine user processes may
perform at the Dirty Read or Committed read level of isolation. Therefore,
each read compares the twomembersof theblobtimestamp pairasa test for
logicalconsistencyofdata.Ifthetwotimestampsinthepairdiffer,thisincon-
sistency is reported as a part of consistency checking. (Refer to page 4-6 for
further information about consistency-checking errors and corrective
actions.)Theerrorindicateseitherthatthepageshavebeencorruptedorthat
the blob forward pointer read by the OnLine user process is no longer valid.
To understand how a forward pointer stored with a blob descriptor or with
the previous segment of blob data may become invalid, consider this
example.AprogramusingDirtyReadisolationis abletoreadrowsthathave
beendeletedprovidedthedeletionhasnotyetbeencommitted.Assumethat
one OnLine server process is deleting a blob from a data row. During the
delete process, another OnLine server process operating with a Dirty Read
isolation level reads the same row, searching for the blob descriptor infor-
mation. In the meantime, the first transaction completes, the blob is deleted,
the space is freed, and a third process starts to write new blob data in the
newly freed space where the first blob used to exist. Eventually, when the
second OnLine server process starts to read the blob data at the location
where the first blob had been stored, the process compares the value of the
timestampreceivedfromtheblobdescriptorwiththevalueofthetimestamp
that precedes the blob data. The timestamps will not match. The blob
timestampontheblobpagewill begreaterthanthetimestamp intheforward
pointer,indicatingto the server processthat the forwardpointerinformation
it has is obsolete.
Kommentare zu diesen Handbüchern