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]
directory service using the
.B syncrepl
replication engine.
-.B id
+.B rid
identifies the current
.B syncrepl
directive within the replication consumer site.
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
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 );
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 );
}
}
-#define IDSTR "id"
+#define IDSTR "rid"
#define PROVIDERSTR "provider"
#define SUFFIXSTR "suffix"
#define UPDATEDNSTR "updatedn"
"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 )) {
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
/* 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;
}
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;
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 );