IBM 000-8697 Manuel D’Utilisation

Page de 702
System Architecture
2-45
Managing Shared-Memory Resources
The blob timestamp on the disk page changes each time the blob data on the
page is overwritten. The blob timestamp stored with the forward pointer
changes each time a new blob replaces the old blob. For example, when a blob
in a data row is updated, the new blob is stored on disk, and the forward
pointer stored with the blob descriptor is revised to point to the new location.
The blob timestamp in the data row is updated and synchronized with the
blob timestamp on the new blob’s disk page. The blob timestamp on the now-
obsolete disk page is no longer synchronized. (An illustration of blobspace
blob storage shows this in
.)
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 two members of the blob timestamp pair as a test for
logical consistency of data. If the two timestamps in the pair differ, this incon-
sistency is reported as a part of consistency checking. (Refer to
further information about consistency-checking errors and corrective
actions.) The error indicates either that the pages have been corrupted or that
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. A program using Dirty Read isolation is able to read rows that have
been deleted provided the deletion has not yet been committed. Assume that
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
timestamp received from the blob descriptor with the value of the timestamp
that precedes the blob data. The timestamps will not match. The blob
timestamp on the blobpage will be greater than the timestamp in the forward
pointer, indicating to the server process that the forward pointer information
it has is obsolete.