mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-31 12:09:35 -05:00
allow per-target retry in searches (ITS#4150)
This commit is contained in:
parent
852e4e3109
commit
f0dac82597
3 changed files with 45 additions and 1 deletions
|
|
@ -1411,3 +1411,13 @@ member: cn=Another Added Group,ou=Groups,o=Example,c=US
|
|||
|
||||
# refldap://localhost:9016/cn=Somewhere,ou=Meta,dc=example,dc=com??sub
|
||||
|
||||
# searching filter="(member=cn=Another Added Group,ou=Groups,o=Example,c=US)"
|
||||
# attrs="member"
|
||||
# base="o=Example,c=US"
|
||||
# with a timed out connection...
|
||||
dn: cn=Another Added Group,ou=Groups,o=Example,c=US
|
||||
member: cn=Added Group,ou=Groups,o=Example,c=US
|
||||
member: cn=Another Added Group,ou=Groups,o=Example,c=US
|
||||
|
||||
# refldap://localhost:9016/cn=Somewhere,ou=Meta,dc=example,dc=com??sub
|
||||
|
||||
|
|
|
|||
|
|
@ -35,6 +35,8 @@ argsfile @TESTDIR@/slapd.2.args
|
|||
#rwmmod#modulepath ../servers/slapd/overlays/
|
||||
#rwmmod#moduleload rwm.la
|
||||
|
||||
idletimeout 5
|
||||
|
||||
#######################################################################
|
||||
# database definitions
|
||||
#######################################################################
|
||||
|
|
|
|||
|
|
@ -412,6 +412,38 @@ case $RC in
|
|||
;;
|
||||
esac
|
||||
|
||||
echo "Waiting 10 seconds for cached connections to timeout..."
|
||||
sleep 10
|
||||
|
||||
echo "Searching with a timed out connection..."
|
||||
echo "# searching filter=\"$FILTER\"" >> $SEARCHOUT
|
||||
echo "# attrs=\"member\"" >> $SEARCHOUT
|
||||
echo "# base=\"$BASEDN\"" >> $SEARCHOUT
|
||||
echo "# with a timed out connection..." >> $SEARCHOUT
|
||||
$LDAPSEARCH -S "" -h $LOCALHOST -p $PORT3 -D "cn=Manager,$BASEDN" -w $PASSWD \
|
||||
-b "$BASEDN" "$FILTER" member \
|
||||
>> $SEARCHOUT 2>&1
|
||||
RC=$?
|
||||
#if test $RC != 0 ; then
|
||||
# echo "Search failed ($RC)!"
|
||||
# test $KILLSERVERS != no && kill -HUP $KILLPIDS
|
||||
# exit $RC
|
||||
#fi
|
||||
case $RC in
|
||||
0)
|
||||
;;
|
||||
51)
|
||||
echo "### Hit LDAP_BUSY problem; you may want to re-run the test"
|
||||
test $KILLSERVERS != no && kill -HUP $KILLPIDS
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
echo "Search failed ($RC)!"
|
||||
test $KILLSERVERS != no && kill -HUP $KILLPIDS
|
||||
exit $RC
|
||||
;;
|
||||
esac
|
||||
|
||||
echo "Filtering ldapsearch results..."
|
||||
. $LDIFFILTER < $SEARCHOUT > $SEARCHFLT
|
||||
echo "Filtering original ldif used to create database..."
|
||||
|
|
@ -576,7 +608,7 @@ RC=$?
|
|||
#if test $RC != 6 ; then
|
||||
# echo "Compare failed ($RC)!"
|
||||
# test $KILLSERVERS != no && kill -HUP $KILLPIDS
|
||||
# exit $RC
|
||||
# exit -1
|
||||
#fi
|
||||
case $RC in
|
||||
6)
|
||||
|
|
|
|||
Loading…
Reference in a new issue