If an ldap synch is aborted in the middle of the synch (e.g. by stopping Alfresco), the synch will refuse to run again for the next 24 hours, and will throw in the log:
[org.alfresco.repo.security.sync.ChainingUserRegistrySynchronizer] User registry synchronization already running in another thread. Synchronize aborted
Steps to reproduce:
- Configure Alfresco to perform an LDAP synch - set it run e.g. every 5 minutes
- Stop Alfresco whilst in the middle of the synch.
- Restart Alfresco
- Wait until the next run should kick off
– Expected behaviour
- synch performs as normal
- Observed behaviour
- above error is thrown in log.
ChainingUserRegistrySynchronizer gets a lock for 24 hours. Can we reduce this?
/** The maximum time this lock will be held for (1 day). */
private static final long LOCK_TTL = 1000 * 60 * 60 * 24;
Remove the lock from the DB:
To find out which row to remove from the alf_lock table:
select * from alf_lock where shared_resource_id = (select id from alf_lock_resource where qname_localname = 'chaininguserregistrysynchronizer');