711b9de Ticket 49624 cont - DB Deadlock on modrdn appears to corrupt database and entry cache

Authored and Committed by lkrispen 4 years ago
    Ticket 49624 cont - DB Deadlock on modrdn appears to corrupt database and entry cache
    
    Bug: If there are deadlocks a transaction will be retried. In the case
    	of modrdn operation there is an error in handling the newsuperior
    	dn, which has to be reset when the txn is repeated.
         There is also an error in freeing the entry stored in the pblock which can
    	lead to a double free
         There is also a memory leak for ec entries
    
    Fix: check if the newsuperior in the pblock was changed before the retry and
    	only then free and reset it.
         check and protect pblock entry from double free
         remove ec entry from cache
         fix the txn_test_thread to run
    
         There is also a message at shutdown that entries remain in the entry cache
    	although no leaks are reported and a hash dump didn't show entries.
    	Change log level to avoid confusion
    
    Reviewed by: Thierry, William, Viktor - Thanks