[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: (ITS#5221) cache? of parent failes for hdb

Dan.Oscarsson@tietoenator.com wrote:
> If this looks correct to you, what code should I add to fix it?
> It would be better if one of you who knows the code better than me could
> do that. I can test and see if it works.
> I hope this is the only place in cache handling of an entries children,
> though maybe someone with better knowledge on the code can identify
> others.
> Hope this is the bug as I have used many days to trace it down and need
> to do some normal work for my company.

Thanks for your investigation; this explanation makes sense. You can test this 
simply by disabling the statement in bdb_cache_modrdn() which sets the NO_KIDS 

Index: cache.c
RCS file: /repo/OpenLDAP/pkg/ldap/servers/slapd/back-bdb/cache.c,v
retrieving revision 1.157
diff -u -r1.157 cache.c
--- cache.c     12 Nov 2007 10:41:45 -0000      1.157
+++ cache.c     20 Nov 2007 15:09:29 -0000
@@ -1148,8 +1148,10 @@
         free( ei->bei_nrdn.bv_val );
         ber_dupbv( &ei->bei_nrdn, nrdn );

+#if 0
         if ( !pei->bei_kids )
                 pei->bei_state |= CACHE_ENTRY_NO_KIDS | CACHE_ENTRY_NO_GRANDKIDS;

  #ifdef BDB_HIER
         free( ei->bei_rdn.bv_val );

Please try that and report your results. I don't think this is the best fix, 
but if it helps your test then we can refine it from there.
   -- Howard Chu
   Chief Architect, Symas Corp.  http://www.symas.com
   Director, Highland Sun        http://highlandsun.com/hyc/
   Chief Architect, OpenLDAP     http://www.openldap.org/project/