mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-20 22:59:34 -05:00
For test063
add hex timestamp to lutil_debug() output Fix LASTMOD race condition in accesslog.c Set refreshInterval even if using refreshAndPersist, since fallbacks will use refresh params
This commit is contained in:
parent
4f35d789ac
commit
8d74f717ff
3 changed files with 26 additions and 7 deletions
|
|
@ -62,8 +62,9 @@ void (lutil_debug)( int debug, int level, const char *fmt, ... )
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
sprintf(buffer, "%08x ", time(0L));
|
||||||
va_start( vl, fmt );
|
va_start( vl, fmt );
|
||||||
vsnprintf( buffer, sizeof(buffer), fmt, vl );
|
vsnprintf( buffer+9, sizeof(buffer)-9, fmt, vl );
|
||||||
buffer[sizeof(buffer)-1] = '\0';
|
buffer[sizeof(buffer)-1] = '\0';
|
||||||
if( log_file != NULL ) {
|
if( log_file != NULL ) {
|
||||||
fputs( buffer, log_file );
|
fputs( buffer, log_file );
|
||||||
|
|
|
||||||
|
|
@ -2110,6 +2110,7 @@ accesslog_db_root(
|
||||||
AttributeDescription *ad = NULL;
|
AttributeDescription *ad = NULL;
|
||||||
const char *text = NULL;
|
const char *text = NULL;
|
||||||
Entry *e_ctx;
|
Entry *e_ctx;
|
||||||
|
BackendDB db;
|
||||||
|
|
||||||
e = entry_alloc();
|
e = entry_alloc();
|
||||||
ber_dupbv( &e->e_name, li->li_db->be_suffix );
|
ber_dupbv( &e->e_name, li->li_db->be_suffix );
|
||||||
|
|
@ -2154,7 +2155,8 @@ accesslog_db_root(
|
||||||
}
|
}
|
||||||
be_entry_release_rw( op, e_ctx, 0 );
|
be_entry_release_rw( op, e_ctx, 0 );
|
||||||
}
|
}
|
||||||
op->o_bd = li->li_db;
|
db = *li->li_db;
|
||||||
|
op->o_bd = &db;
|
||||||
|
|
||||||
op->ora_e = e;
|
op->ora_e = e;
|
||||||
op->o_req_dn = e->e_name;
|
op->o_req_dn = e->e_name;
|
||||||
|
|
@ -2162,7 +2164,6 @@ accesslog_db_root(
|
||||||
op->o_callback = &nullsc;
|
op->o_callback = &nullsc;
|
||||||
SLAP_DBFLAGS( op->o_bd ) |= SLAP_DBFLAG_NOLASTMOD;
|
SLAP_DBFLAGS( op->o_bd ) |= SLAP_DBFLAG_NOLASTMOD;
|
||||||
rc = op->o_bd->be_add( op, &rs );
|
rc = op->o_bd->be_add( op, &rs );
|
||||||
SLAP_DBFLAGS( op->o_bd ) ^= SLAP_DBFLAG_NOLASTMOD;
|
|
||||||
if ( e == op->ora_e )
|
if ( e == op->ora_e )
|
||||||
entry_free( e );
|
entry_free( e );
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ case "$SYNCMODE" in
|
||||||
SYNCTYPE="type=refreshOnly interval=00:00:00:03"
|
SYNCTYPE="type=refreshOnly interval=00:00:00:03"
|
||||||
;;
|
;;
|
||||||
rp)
|
rp)
|
||||||
SYNCTYPE="type=refreshAndPersist"
|
SYNCTYPE="type=refreshAndPersist interval=00:00:00:03"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "unknown sync mode $SYNCMODE"
|
echo "unknown sync mode $SYNCMODE"
|
||||||
|
|
@ -288,8 +288,26 @@ if test $RC != 0 ; then
|
||||||
exit $RC
|
exit $RC
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Waiting $SLEEP1 seconds for syncrepl to receive changes..."
|
THEDN="cn=James A Jones 2,ou=Alumni Association,ou=People,dc=example,dc=com"
|
||||||
sleep $SLEEP1
|
sleep 1
|
||||||
|
for i in 1 2 3; do
|
||||||
|
$LDAPSEARCH -S "" -b "$THEDN" -H $URI1 \
|
||||||
|
-s base '(objectClass=*)' entryCSN > "${MASTEROUT}.$i" 2>&1
|
||||||
|
RC=$?
|
||||||
|
|
||||||
|
if test $RC = 0 ; then
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test $RC != 32 ; then
|
||||||
|
echo "ldapsearch failed at slave ($RC)!"
|
||||||
|
test $KILLSERVERS != no && kill -HUP $KILLPIDS
|
||||||
|
exit $RC
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Waiting $SLEEP1 seconds for syncrepl to receive changes..."
|
||||||
|
sleep $SLEEP1
|
||||||
|
done
|
||||||
|
|
||||||
n=1
|
n=1
|
||||||
while [ $n -le $MMR ]; do
|
while [ $n -le $MMR ]; do
|
||||||
|
|
@ -353,7 +371,6 @@ n=`expr $n + 1`
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "Using ldapmodify to force conflicts between server 1 and 2..."
|
echo "Using ldapmodify to force conflicts between server 1 and 2..."
|
||||||
THEDN="cn=James A Jones 2,ou=Alumni Association,ou=People,dc=example,dc=com"
|
|
||||||
$LDAPMODIFY -D "$MANAGERDN" -H $URI1 -w $PASSWD \
|
$LDAPMODIFY -D "$MANAGERDN" -H $URI1 -w $PASSWD \
|
||||||
>> $TESTOUT 2>&1 << EOF
|
>> $TESTOUT 2>&1 << EOF
|
||||||
dn: $THEDN
|
dn: $THEDN
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue