7b6a831 Bug 748575 - rhds81 modrn operation and 100% cpu use in replication

Authored and Committed by rmeggins 12 years ago
    Bug 748575 - rhds81 modrn operation and 100% cpu use in replication
    
    https://bugzilla.redhat.com/show_bug.cgi?id=748575
    Resolves: bug 748575
    Bug Description: rhds81 modrn operation and 100% cpu use in replication
    Reviewed by: ???
    Branch: Directory_Server_8_2_Branch
    Fix Description: The modrdn operation causes the entry to be copied multiple
    times by calling slapi_entry_dup.  This in turn does a csnset_dup of the
    e_dncsnset in the entry.  This function was very inefficient.  It would simply
    call csnset_add_csn, which would iterate to the end of the linked list
    for every addition.  Once you get several thousand items in the list, it
    has to iterate to the end of several thousand items each time.  I changed it
    to keep track of the last item in the list, and just add the new item to the
    end of the list.  This improves the performance quite a bit, but the cpu
    still gets pegged at a high percentage eventually, it just takes longer to
    reach that point.
    Platforms tested: RHEL6 x86_64
    Flag Day: no
    Doc impact: no
    (cherry picked from commit 23467126c33a1f6004bb8357d87bc355a53eb25d)
    
        
file modified
+3 -1