Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Fixed some info about MasterTable

...

Such a table stores entries with the Tuple key set to some unique identifier and the value set to a serialized representation of the entry. The identifier must be unique and will most likely be , right now it's a long and is sequential.

With the new ServerEntry Entry API, entries serialized into such a table will now don't contain their DN even if the DN is not exposed or stored as an attribute (like ou and objectClass) in the serialized entry. This means such a table is all that is required to reconstruct the entire partition and represents a master copy of the information regarding an entrywe have to rebuild it using the RDN index in order to return the full Entry. The rest of the information in the partition can be derived from this master copy.

Hence the MasterTable interface extends the Table interface to lookup entries by numeric identifiers. Tuple keys are Long identifiers, and Tuple values are serialized ServerEntry objects.

Note

Using Long as identifier has the advantage of being simple, but the problem is that we have to deal with the sequential aspect : we need to store each new created number on the disk, which leads to an extra disk access when creating an entry. Also this unique number will be local. We think that using the entry UUID instead would be a better idea.

The MasterTable also contains a means to store simple key value pair properties associated with the partition. These many be used to store configuration settings or other bits of information.

The MasterTable also exposes access to a persistent sequence counter used to generate new identifiers when adding new entries to the table.

...

.

JDBM MasterTable Implementation

The JDBM based MasterTable implementation, JdbmMasterTable, simply extends a JdbmTable and locks the Tuple keys to use Long objects. A custom Serializer is used to marshal ServerEntry Entry objects to and from this Table. The implementation uses a property for persisting the current value of it's sequencial counter which starts at 1. There is no entry with value 0.

The properties object is another BTree contained in the master.db file. The other BTree is the primary one used to store Long identifiers mapped to serialized ServerEntry Entry bytes.

There's not much to the JdbmMasterTable implementation: it's pretty straight forward. However future changes may change that: see below on how if you're curious.

...