b6c146f Ticket 49915 - Master ns-slapd had 100% CPU usage after starting replication and replication cannot finish

Authored and Committed by tbordaz 10 months ago
    Ticket 49915 - Master ns-slapd had 100% CPU usage after starting replication and replication cannot finish
    
    Bug Description:
    	During a total initialization the supplier builds a candidate list of the entries to send.
    	Because of https://fedorahosted.org/389/ticket/48755, the candidate list relies on parentid attribute.
    	All entries, except tombstones and suffix itself, have parentid.
    	There is an assumption that the first found key (i.e. '=1') contains the suffix children.
    	So when it finally finds the suffix key it adds its children to a leftover list rather to the candidate list.
    	Later idl_new_range_fetch loops for ever trying to add suffix children from leftover to candidate list.
    
    Fix Description:
    	The fix consist to store the suffix_id (if it does not exist already) in the parentid index (with the key '=0').
    	Then get it to detect the suffix key from the index in idl_new_range_fetch.
    
    https://pagure.io/389-ds-base/issue/49915
    
    Reviewed by: Ludwig Krispenz, William Brown (thanks !)
    
    Platforms tested: F27
    
    Flag Day: no
    
    Doc impact: no