5ef3183 Ticket 47750 - Need to refresh cache entry after called betxn postop plugins

Authored and Committed by mreynolds 9 years ago
    Ticket 47750 - Need to refresh cache entry after called betxn postop plugins
    
    Bug Description:  If deleting an entry triggers multiple betxn plugins, the
                      entry might not be removed the cache - which prevents that
                      same entry(same dn) from being re-added(error 68).  For
                      example, the RI and memberOf plugins are enabled.  Then we
                      add a user to a group.  This adds the memberOf attribute
                      to the entry.  We then delete that user, which triggers the
                      RI plugin, which then triggers the memberOf plugin.  So the
                      entry that is deleted gets modified in bvetxn postop, and
                      has its its cache entry replaced.  This then confuses the
                      cache logic at the end of the delete operation, and the entry
                      is not removed from the cache.
    
    Fix Description:  Refresh the cache entry after calling the betxn postop plugins.
                      If the entry has changed, return the old old entry and proceed
                      with the new one.
    
    https://fedorahosted.org/389/ticket/47750
    
    Reviewed by: nhosoi & rmeggins (Thanks!!)
    
    (cherry picked from commit 4a5eee63f45ed290375440827c92af9b2347a177)