457252f Ticket 47973 - During schema reload sometimes the search

Authored and Committed by mreynolds 9 years ago
    Ticket 47973 - During schema reload sometimes the search
     returns no results
    
    Bug Description:  During a schema reload operation the search of an existing
                      entry may randomly report no results.  This is because during
                      the schema reload all existing attribute syntaxes are removed,
                      and there is a small window where ldap operations can be performed
                      before the new schema is loaded.  During this window, attribute
                      values are normalized to NULL which causes operation to unexpectedly
                      fail.
    
    Fix Description:  Instead of wiping out the existing attribute syntax hastables
                      in the middle of the task, instead load the new schema into
                      temporary hash tables.  Once the reload is complete, then take
                      the asi write lock, remove the old hash tables, and swap in the
                      new ones.
    
    https://fedorahosted.org/389/ticket/47973
    
    valgrind: PASSED
    
    Reviewed by: nhosoi(Thanks!)
    
    (cherry picked from commit 3fafcbe0a2ada038f02efdfdce77c1768f0e1819)
    
    Conflicts:
    	ldap/servers/slapd/attrsyntax.c
    	ldap/servers/slapd/proto-slap.h
    
        
file modified
+4 -4
file modified
+167 -63
file modified
+64 -52