Author: nkinder
Update of /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv10823
Modified Files: ldbm_add.c Log Message: Resolves: 238517 Summary: Add entries to entrycache after adding operational attributes.
Index: ldbm_add.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/ldbm_add.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- ldbm_add.c 10 Nov 2006 23:45:39 -0000 1.6 +++ ldbm_add.c 1 Oct 2007 18:52:35 -0000 1.7 @@ -458,13 +458,6 @@ slapi_entry_add_string(addingentry->ep_entry, SLAPI_ATTR_VALUE_PARENT_UNIQUEID, operation->o_params.p.p_add.parentuniqueid); } } - if ( cache_add_tentative( &inst->inst_cache, addingentry, NULL )!= 0 ) - { - LDAPDebug( LDAP_DEBUG_CACHE, "cache_add_tentative concurrency detected\n", 0, 0, 0 ); - ldap_result_code= LDAP_ALREADY_EXISTS; - goto error_return; - } - addingentry_in_cache= 1; }
/* @@ -537,6 +530,16 @@ add_update_entry_operational_attributes(addingentry, pid); }
+ /* Tentatively add the entry to the cache. We do this after adding any + * operational attributes to ensure that the cache is sized correctly. */ + if ( cache_add_tentative( &inst->inst_cache, addingentry, NULL )!= 0 ) + { + LDAPDebug( LDAP_DEBUG_CACHE, "cache_add_tentative concurrency detected\n", 0, 0, 0 ); + ldap_result_code= LDAP_ALREADY_EXISTS; + goto error_return; + } + addingentry_in_cache= 1; + /* * Before we add the entry, find out if the syntax of the aci * aci attribute values are correct or not. We don't want to
389-commits@lists.fedoraproject.org