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

Nicolas Capponi
23.34.2014 184794cf69c20ac52ad9049da9757b74c4438011
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
commit184794cf69c20ac52ad9049da9757b74c4438011
tree 85921e83e43dee44184d44cf7d992aa0f33b0e28 tree | zip | gz
parent f2b3fa453372b5f2b56263f05fdcee9b014eefaa 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
opends/src/server/org/opends/server/replication/server/changelog/file/FileChangelogDB.java 4 ●●● diff | view | raw | blame | history