Ticket 49915 - Master ns-slapd had 100% CPU usage after starting replication and replication cannot finish
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.
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.
Reviewed by: Ludwig Krispenz, William Brown (thanks !)
Platforms tested: F27
Flag Day: no
Doc impact: no