Infinite delta-MMR (accesslog) synchronization (syncrepl drawback)
erthink opened this issue · 0 comments
erthink commented
In some cases delta-mmr (si_logstate == SYNCLOG_LOGBASED
) synchronization could not resolve LDAP_ALREADY_EXISTS error(s) even by fallback to full-refresh mode. Or in the other words these errors may occur again after full-refresh cycle (si_logstate = SYNCLOG_FALLBACK
) and returning back.
From the outside this visible as endless synchronization attempts which ends to into a dirty state.
The minimal scenario seems like this:
- setup 2 or more slapd with delta-MMR with syncrepl-DN inside replication scope, but don't create such DN at this step (i.e. syncrepl can't connect now).
- add syncrepl-DN on each node, this also allows syncrepl to connect.
- synchronization may cyclically fail on the syncrepl-DN with LDAP_ALREADY_EXISTS.
Probably fix:
- Ignore
LDAP_ALREADY_EXISTS
forLDAP_REQ_ADD
when an entry has the same type/class and attributes, but update entry-CSN if incoming value more recent. - Silently ignore
LDAP_NO_SUCH_OBJECT
forLDAP_REQ_DELETE
.