Cause: The directory server is using replication and DNA. The client does a sequence of ADD/DELETE requests for the same entry over and over again.
Consequence: The directory server will give errors containing "modify_switch_entries failed".
Fix: When replication is used, there is an entry in the directory server that holds the metadata for the operation (the RUV), which is updated and written to the database for each operation. This includes internal operations, such as DNA. The nested DNA operation was overwriting the pointer to the RUV held by the main operation (ADD, DELETE). The fix is for the outer operation to acquire a pointer to this RUV _after_ the inner operation has completed.
Result: There are no more "modify_switch_entries failed" errors when doing many ADD/DELETE operations.