Compaq AA-Q88CE-TE Network Router User Manual


 
Partition Management
3.3 Life Cycle of a Partition
3.3.1 Implicit Partition Creation
Partitions are created implicitly when an application program calls
rtr_open_channel( )
to create a server channel, specifying the key segments
and value ranges for the segments with the
pkeyseg
argument. Other partition
attributes are established with the
flags
argument. Before RTR V3.2, this was
the only way in which partitions could be created. Partitions created in this way
are automatically deleted when the last server channel to the partition is closed.
3.3.2 Explicit Partition Creation
Partitions can also be created by the system operator before server application
program start up using system management commands. This gives the operator
more control over partition characteristics. Partitions created in this way remain
in the system until either explicitly deleted by the operator, or RTR is stopped.
3.3.3 Persistence of Partition Definitions
RTR stores partition definitions in the journal, and records for each transaction
the partition in which it was processed. This is convenient when viewing or
editing the contents of the journal, where the partition name can be used to
select a subset of the transactions in the journal. RTR will not permit a change
in the partition name or definition as long as transactions remain in the journal
that were processed under the current name or definition for the partition. If
transactions remain in the journal and you need to change the partition name or
definition, you can take the following actions:
Start appropriate servers to complete processing of the transactions.
Remove the transactions from the journal with the
SET TRANSACTION
command.
Replace the RTR journal with the
CREATE JOURNAL/SUPERSEDE
command. Note
that this will destroy any transactions remaining in the journal and should be
done with caution.
3.4 Binding Server Channels to Named Partitions
For a server application to be able to open a channel to an explicitly created
partition, the application passes the name of the partition through the
pkeyseg
argument of
rtr_open_channel( )
call. It is not necessary to pass key segment
descriptors, but if the application does so, they must be compatible with the
existing partition definition. You may pass partition characteristics through the
flags
argument, but these will be superseded by those of the existing partition.
Example:
RTR> create partition/KEY1=(type. . .) par_one
...
rtr_keyseg_t partition_name;
partition_name.ks_type = rtr_keyseg_partition;
partition_name.ks_lo_bound = "par_one";
status - rtr_open_channel( . . ., RTR_F_OPE_SERVER, . . ., 1, &partition_name);
Summarizing, to fully de-couple server applications from the definition of the
partitions to be processed, write applications that open server channels where
only the required partition name is passed. Leave the management of the
partition characteristics to the system managers and operators.
Partition Management 3–3