69.2 Space
A Space is a lightweight logical namespace containing serial
elements indexed by 32-bit Seids. Each Space belongs to an
Partition and is indexed within that partition by a 32-bit
SpaceId.
The next Seid used for sequential allocation belongs to the
Space, while the RPM owns the
radix mapping from Seids to log-record positions:
class Space
{
SpaceId id;
Seid nextSeid;
RPM rpm;
};
A checkpointed or published Space state contains both the allocation state and the corresponding
RPM root. Readers use the RPM root; the writer uses nextSeid for
allocation.
The allocation state and RPM are separate but coupled. Every explicitly reserved or inserted Seid
must be less than nextSeid. Inserting a caller-supplied Seid therefore
goes through Space, which advances
nextSeid when required as well as updating the RPM.
Affiliate allocation uses RPM-node occupancy and forwarding information to choose a Seid near an
existing Seid. It is exposed as a Space allocation operation,
with the RPM providing the radix-tree information used by the allocation algorithm.