mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-01-06 06:59:54 -05:00
misc updates
- syncrepl : id -> rid - man page update
This commit is contained in:
parent
5a8047288b
commit
4ae382fd79
6 changed files with 38 additions and 14 deletions
|
|
@ -1125,7 +1125,7 @@ particular, it is not possible to use moddn to move an entry from
|
|||
one subordinate to another subordinate within the namingContext.
|
||||
.HP
|
||||
.hy 0
|
||||
.B syncrepl id=<replica ID>
|
||||
.B syncrepl rid=<replica ID>
|
||||
.B provider=ldap[s]://<hostname>[:port]
|
||||
.B [type=refreshOnly|refreshAndPersist]
|
||||
.B [interval=dd:hh:mm:ss]
|
||||
|
|
@ -1161,7 +1161,7 @@ setting up a replicated
|
|||
directory service using the
|
||||
.B syncrepl
|
||||
replication engine.
|
||||
.B id
|
||||
.B rid
|
||||
identifies the current
|
||||
.B syncrepl
|
||||
directive within the replication consumer site.
|
||||
|
|
|
|||
|
|
@ -170,6 +170,30 @@ any shell back-ends will run as the specified non-privileged user.
|
|||
will read the configuration file (the default if none is given with the
|
||||
\fI\-f\fP switch) and check its syntax, without opening any listener
|
||||
or database.
|
||||
.TP
|
||||
.BI \-c " cookie"
|
||||
This option provides a cookie for a syncrepl replication consumer.
|
||||
The cookie is a comma separated list of name=value pairs.
|
||||
Currently supported syncrepl cookie fields are
|
||||
.B csn,
|
||||
.B sid,
|
||||
and
|
||||
.B rid.
|
||||
.B csn
|
||||
is the commit sequence number of the master content at the provider site
|
||||
and represents the state of the content to which the replica content
|
||||
was synchronized most recently.
|
||||
.B sid
|
||||
is the identity of the session which this replication thread belongs to.
|
||||
The replication provider site may maintain a session history store
|
||||
for each replication session to reduce synchronization traffic.
|
||||
.B rid
|
||||
identifies a replication thread within a replication consumer site
|
||||
and is used to find the replication thread specification of
|
||||
.BR slapd.conf (5)
|
||||
having the same
|
||||
.B rid
|
||||
value as the cookie.
|
||||
.SH EXAMPLES
|
||||
To start
|
||||
.I slapd
|
||||
|
|
|
|||
|
|
@ -271,7 +271,7 @@ bdb_get_commit_csn(
|
|||
struct berval bv;
|
||||
|
||||
LDAP_STAILQ_FOREACH( si, &op->o_bd->be_syncinfo, si_next ) {
|
||||
sprintf( substr, "cn=syncrepl%d", si->si_id );
|
||||
sprintf( substr, "cn=syncrepl%d", si->si_rid );
|
||||
ber_str2bv( substr, 0, 0, &bv );
|
||||
build_new_dn( &ctxcsn_ndn, &op->o_bd->be_nsuffix[0], &bv, NULL );
|
||||
|
||||
|
|
|
|||
|
|
@ -2800,7 +2800,7 @@ add_syncrepl(
|
|||
rc = parse_syncrepl_line( cargv, cargc, si );
|
||||
|
||||
LDAP_STAILQ_FOREACH( si_entry, &be->be_syncinfo, si_next ) {
|
||||
if ( si->si_id == si_entry->si_id ) {
|
||||
if ( si->si_rid == si_entry->si_rid ) {
|
||||
#ifdef NEW_LOGGING
|
||||
LDAP_LOG( CONFIG, ERR,
|
||||
"add_syncrepl: duplicaetd replica id\n", 0, 0,0 );
|
||||
|
|
@ -2866,7 +2866,7 @@ add_syncrepl(
|
|||
}
|
||||
}
|
||||
|
||||
#define IDSTR "id"
|
||||
#define IDSTR "rid"
|
||||
#define PROVIDERSTR "provider"
|
||||
#define SUFFIXSTR "suffix"
|
||||
#define UPDATEDNSTR "updatedn"
|
||||
|
|
@ -2929,7 +2929,7 @@ parse_syncrepl_line(
|
|||
"syncrepl id %d is out of range [0..999]\n", tmp );
|
||||
return -1;
|
||||
}
|
||||
si->si_id = tmp;
|
||||
si->si_rid = tmp;
|
||||
gots |= GOT_ID;
|
||||
} else if ( !strncasecmp( cargv[ i ], PROVIDERSTR,
|
||||
sizeof( PROVIDERSTR ) - 1 )) {
|
||||
|
|
|
|||
|
|
@ -1313,7 +1313,7 @@ LDAP_STAILQ_HEAD( slap_sync_cookie_s, sync_cookie );
|
|||
|
||||
typedef struct syncinfo_s {
|
||||
struct slap_backend_db *si_be;
|
||||
long si_id;
|
||||
long si_rid;
|
||||
char *si_provideruri;
|
||||
BerVarray si_provideruri_bv;
|
||||
#define SYNCINFO_TLS_OFF 0
|
||||
|
|
|
|||
|
|
@ -310,15 +310,15 @@ do_syncrep1(
|
|||
|
||||
/* get syncrepl cookie of shadow replica from subentry */
|
||||
|
||||
assert( si->si_id < 1000 );
|
||||
assert( si->si_rid < 1000 );
|
||||
syncrepl_cn_bv.bv_val = syncrepl_cbuf;
|
||||
syncrepl_cn_bv.bv_len = snprintf(syncrepl_cbuf, sizeof(syncrepl_cbuf),
|
||||
CN_STR "syncrepl%d", si->si_id );
|
||||
CN_STR "syncrepl%d", si->si_rid );
|
||||
build_new_dn( &op->o_req_ndn, psub, &syncrepl_cn_bv, op->o_tmpmemctx );
|
||||
op->o_req_dn = op->o_req_ndn;
|
||||
|
||||
LDAP_STAILQ_FOREACH( sc, &slap_sync_cookie, sc_next ) {
|
||||
if ( si->si_id == sc->rid ) {
|
||||
if ( si->si_rid == sc->rid ) {
|
||||
cmdline_cookie_found = 1;
|
||||
break;
|
||||
}
|
||||
|
|
@ -1492,10 +1492,10 @@ syncrepl_updateCookie(
|
|||
modtail = &mod->sml_next;
|
||||
|
||||
ber_dupbv( &cnbva[0], (struct berval *) &slap_syncrepl_bvc );
|
||||
assert( si->si_id < 1000 );
|
||||
assert( si->si_rid < 1000 );
|
||||
cnbva[0].bv_len = snprintf( cnbva[0].bv_val,
|
||||
slap_syncrepl_bvc.bv_len,
|
||||
"syncrepl%d", si->si_id );
|
||||
"syncrepl%d", si->si_rid );
|
||||
mod = (Modifications *) ch_calloc( 1, sizeof( Modifications ));
|
||||
mod->sml_op = LDAP_MOD_REPLACE;
|
||||
mod->sml_desc = slap_schema.si_ad_cn;
|
||||
|
|
@ -1545,10 +1545,10 @@ syncrepl_updateCookie(
|
|||
e = ( Entry * ) ch_calloc( 1, sizeof( Entry ));
|
||||
|
||||
slap_syncrepl_cn_bv.bv_val = syncrepl_cbuf;
|
||||
assert( si->si_id < 1000 );
|
||||
assert( si->si_rid < 1000 );
|
||||
slap_syncrepl_cn_bv.bv_len = snprintf( slap_syncrepl_cn_bv.bv_val,
|
||||
slap_syncrepl_cn_bvc.bv_len,
|
||||
"cn=syncrepl%d", si->si_id );
|
||||
"cn=syncrepl%d", si->si_rid );
|
||||
|
||||
build_new_dn( &slap_syncrepl_dn_bv, pdn, &slap_syncrepl_cn_bv,
|
||||
op->o_tmpmemctx );
|
||||
|
|
|
|||
Loading…
Reference in a new issue