Netscape DIRECTORY SERVER 6.2 - PLUG-IN Manual page 149

Table of Contents

Advertisement

Each time the server gets a request for a suffix that contains the distribution
function, the function is called. The function then decides which database
(backend) processes the request. The decision made by the function is based on
some piece of information present in the pblock at the time of the request (such as
the entry DN, a hash function, the time of day, or the type of operation).
For search operations, the function can forward the operation to just one database
or to all databases.
The distribution function itself looks as follows:
int distribution_function(Slapi_PBlock *pb, Slapi_DN * dn,
Slapi_Backend **mtn_be, int be_count, Slapi_DN * node_dn);
The following table lists the parameters taken by the distribution function:
Table 12-1
Distribution Function Parameters
Parameter Name
pb
mtn_be
node_dn
be_count
int
The root entry for the suffix must be present in each database in order for the
distribution function to work properly. For example, for the suffix
you need to create an entry corresponding to
o=example.com,
each database involved in the distribution.
Description
The pblock of the plug-in which contains all of the
information about the operations in progress. This structure
is the same as that for other plug-ins (for example, operation
type, IP address of the client, target DN, search filter, bind
credentials, etc.).
A table of size be_count containing the list of databases
defined for the suffix. If a database is defined in the suffix
entry but not available, the corresponding pointer in the
table will be set to NULL.
The suffix containing the distribution function.
The size of the table that contains the list of databases
involved in the distribution of entries.
The row number of the database in the mtn_be table. For
search operations, you can return a value of
MTN_ALL_BACKENDS to specify that all databases must be
searched.
Chapter 12
Creating a Distribution Function
o=example.com
Using the Custom Distribution Logic
in
149

Advertisement

Table of Contents
loading

This manual is also suitable for:

Directory server 6.2

Table of Contents