mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-21 03:10:25 +08:00
ITS#5956 only retry attaching to SHM once
This commit is contained in:
parent
bdd28919c1
commit
6f4b2cc66e
@ -111,6 +111,7 @@ bdb_db_open( BackendDB *be, ConfigReply *cr )
|
|||||||
Entry *e = NULL;
|
Entry *e = NULL;
|
||||||
int do_recover = 0, do_alock_recover = 0;
|
int do_recover = 0, do_alock_recover = 0;
|
||||||
int alockt, quick = 0;
|
int alockt, quick = 0;
|
||||||
|
int do_retry = 1;
|
||||||
|
|
||||||
if ( be->be_suffix == NULL ) {
|
if ( be->be_suffix == NULL ) {
|
||||||
Debug( LDAP_DEBUG_ANY,
|
Debug( LDAP_DEBUG_ANY,
|
||||||
@ -340,9 +341,12 @@ shm_retry:
|
|||||||
": database \"%s\": "
|
": database \"%s\": "
|
||||||
"shared memory env open failed, assuming stale env.\n",
|
"shared memory env open failed, assuming stale env.\n",
|
||||||
be->be_suffix[0].bv_val, 0, 0 );
|
be->be_suffix[0].bv_val, 0, 0 );
|
||||||
|
if ( do_retry ) {
|
||||||
|
do_retry = 0;
|
||||||
goto shm_retry;
|
goto shm_retry;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
Debug( LDAP_DEBUG_ANY,
|
Debug( LDAP_DEBUG_ANY,
|
||||||
LDAP_XSTRING(bdb_db_open) ": database \"%s\" cannot be %s, err %d. "
|
LDAP_XSTRING(bdb_db_open) ": database \"%s\" cannot be %s, err %d. "
|
||||||
"Restore from backup!\n",
|
"Restore from backup!\n",
|
||||||
|
Loading…
Reference in New Issue
Block a user