From: Kurt Zeilenga Date: Tue, 13 Apr 1999 22:41:14 +0000 (+0000) Subject: Add XXX comment to cache modified from underneath kludge. X-Git-Tag: OPENLDAP_SLAPD_BACK_LDAP~191 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=a3f9a59e4b2c8a2b00d94c90e9c68d4203ce1a98;p=openldap Add XXX comment to cache modified from underneath kludge. --- diff --git a/servers/slapd/back-ldbm/id2entry.c b/servers/slapd/back-ldbm/id2entry.c index 783fccc8b2..8c4d8b1409 100644 --- a/servers/slapd/back-ldbm/id2entry.c +++ b/servers/slapd/back-ldbm/id2entry.c @@ -145,7 +145,7 @@ id2entry_rw( Backend *be, ID id, int rw ) ldbm_cache_close( be, db ); if ( e == NULL ) { - Debug( LDAP_DEBUG_TRACE, "<= id2entry_%s( %ld ) (failed)\n", + Debug( LDAP_DEBUG_TRACE, "<= id2entry_%s( %ld ) (failed)\n", rw ? "w" : "r", id, 0 ); return( NULL ); } @@ -160,7 +160,10 @@ id2entry_rw( Backend *be, ID id, int rw ) if( cache_add_entry_rw( &li->li_cache, e, rw ) != 0 ) { entry_free( e ); - /* maybe the entry got added underneath us */ + /* XXX this is a kludge. + * maybe the entry got added underneath us + * There are many underlying race condtions in the cache/disk code. + */ if ( (e = cache_find_entry_id( &li->li_cache, id, rw )) != NULL ) { Debug( LDAP_DEBUG_TRACE, "<= id2entry_%s( %ld ) 0x%lx (cache)\n", rw ? "w" : "r", id, (unsigned long) e );