mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Nicolas Capponi
23.34.2014 95d8ccf86d624a5a09b25ecc0ffbaaf9d79b9fee
refs
author Nicolas Capponi <nicolas.capponi@forgerock.com>
Wednesday, July 23, 2014 11:34 +0200
committer Nicolas Capponi <nicolas.capponi@forgerock.com>
Wednesday, July 23, 2014 11:34 +0200
commit95d8ccf86d624a5a09b25ecc0ffbaaf9d79b9fee
tree 1e61427ecdc2622f778342e004b912909b7b49c0 tree | zip | gz
parent 3906190aff5ceb91cfb0da677bcdf8cb8db73b55 view | diff
OPENDJ-1441 (CR-4037) Persistent searches on external changelog do not return changes for new replicas and new domains

Fixed a problem introduced in r10918.

In getExistingOrNewDomainMap(DN) method, the MultimasterReplication.isECLEnabledDomain() method is called.
However, this method blocks forever at replication startup because MultimasterReplication state is equals to STARTING
and is only set to RUNNING in code that occurs after in the same thread.

Code sequence is :
1. SynchronizationProviderConfigManager calls MultimasterReplication.initializeSynchronizationProvider()
try to call MultimasterReplication.isECLEnabledDomain() but MultimasterReplication state is equals
to STARTING so it waits indefinitely on a state change
2. SynchronizationProviderConfigManager calls DirectoryServer.registerSynchronizationProvider(provider)
MultimasterReplication state is set to RUNNING

Add a check on registeredMultiDomainCursors to ensure that isECLEnabledDomain() is not called when
the replication server is starting (as no cursors can be created yet).
1 files modified
4 ■■■ changed files
opendj-sdk/opends/src/server/org/opends/server/replication/server/changelog/file/FileChangelogDB.java 4 ●●● diff | view | raw | blame | history