db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Korneliussen <Andreas.Kornelius...@Sun.COM>
Subject RowLocation validation, for holdable SUR
Date Mon, 20 Feb 2006 15:56:22 GMT

Following is a proposal to ensure that a client of store can verify the 
validity of a RowLocation.  A RowLocation has become invalid if a store 
operation has caused it to point to another row or to a non-existent 
position (deleted row or non-existing page/record-id).
I think we need a mechanism to detect that a RowLocation has become 
invalid in order to implement *holdable* SUR.

To do this, I would propose:

- The RowLocation object should contain a version number for the page.

- A version number should be stored in the header for a Page

- Whenever an operation which may invalidate row-locations is executed, 
the version number for the page is updated. These operations include 
online/offline compress.

- When navigating to a RowLocation which has invalid version number, the 
store may fail (i.e return false)

The page header for a stored page, currently has a number of fields 
which are intended for future use, and it seems that it is possible to 
use these fields without breaking backward compatibility.
I noticed one of the fields in the header is named "generation" (from 

      *  4 bytes integer	generation      generation number of this 
      *  4 bytes integer	prevGeneration  previous generation of page 

Could I use the generation field for this, or has it been reserved for 
something else ? Alternatively, I could use one of the other long fields 
reserved for future use.

Any comments ?



View raw message