19 Dec, 2013
5 commits
-
ReplicationBroker.java Moved session field to ConnectedRS. Removed field protocolVersion (useless, superseded by ConnectedRS) Reworked ConnectedRS class: removed connected field. In ReplicationServerInfo, added setServerURL() + internally stored a RSInfo object + changed connectedDSs from List to Set. Used Improved javadocs + removed comments redundant with javadocs. ComputeBestServerTest.java: Consequence of the change to ReplicationBroker.ReplicationServerInfo ctor. UnbindOperationTestCase.java, ReplicationDomain.java: Code cleanup. git-svn-id: https://svn.forgerock.org/opendj/trunk@10030 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
ReplicationBroker.java: Changed monitorResponse from MutableBoolean to AtomicBoolean. Replaced fields rsGroupId, rsServerId, rsServerUrl, replicationServer and connected by a single connectedRS + added immutable inner class ConnectedRS. Renamed updateRSInfoLocallyConfiguredStatus() to setLocallyConfiguredFlag(). In receiveTopo(), used Collections.retainAll(). MutableBoolean.java: REMOVED git-svn-id: https://svn.forgerock.org/opendj/trunk@10028 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
ReplicationServerTest.java: In windowProbeTest(), code only expected to receive a WindowMsg in answer to a WindowProbeMsg sent out. The twist is that it only cares about receiving a WindowMsg which means it can discard every other type of messages in the interim, particularly the ones coming from the protocol: MonitorMsgs, HeartbeatMsgs, etc. Used ReplicationTestCase.waitForSpecificMsg() to achieve this. AssuredReplicationPluginTest.java: Code cleanup. git-svn-id: https://svn.forgerock.org/opendj/trunk@10027 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@10025 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
ExtendedOperationHandler.java: Added ctor ExtendedOperationHandler(Set<String> supportedControlOIDs). Implemented initializeExtendedOperationHandler() and finalizeExtendedOperationHandler() by moving common code here from subclasses impls. Made registerControlsAndFeatures() and deregisterControlsAndFeatures() private. Added overridable method getExtendedOperationOID(). GetSymmetricKeyExtendedOperation.java, CancelExtendedOperation.java, GetConnectionIDExtendedOperation.java, PasswordModifyExtendedOperation.java, PasswordPolicyStateExtendedOperation.java, StartTLSExtendedOperation.java, WhoAmIExtendedOperation.java: Removed getSupportedControls() + supportedControlOIDs field member where present - superseded by the superclass ones. In initializeExtendedOperationHandler(), delegated to superclass method. Cannot replace it fully because method signatures do not match. Removed finalizeExtendedOperationHandler(), rely on superclass implementation where possible. Implemented getExtendedOperationOIDI() and getExtendedOperationName() sometimes. Code cleanup. git-svn-id: https://svn.forgerock.org/opendj/trunk@10024 41b1ffd8-f28e-4786-ab96-9950f0a78031
18 Dec, 2013
1 commit
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@10022 41b1ffd8-f28e-4786-ab96-9950f0a78031
17 Dec, 2013
11 commits
-
Don't register configuration change listener in constructor since the constructor is invoked during configuration validation as well as when applying the configuration change. Instead register the listener once the index has been opened, which is only done during backend init and when adding new indexes, and which is also symmetric with listener deregistration which is performed when closing indexes. git-svn-id: https://svn.forgerock.org/opendj/trunk@10021 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@10020 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@10019 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Review of the approach: Matthew Swift Problem is caused by code deep into method calls that calls ReplicationServer.shutdown(). Thread 1 holds a lock on MessageHandler.msgQueue, an exception happens during processing and it then it calls ReplicationServer.shutdown() which then goes and tries to grab JEReplicaDB.msgQueue. Thread 2 holds a lock on JEReplicaDB.msgQueue and then tries to grab MessageHandler.msgQueue. The proper fix is to let the exceptions bubble up to the Thread.run() method, releasing all locks in the process, and call ReplicationServer.shutdown() from there. replication.properties Added stack traces to error messages. ReplicationServerDomain.java: Consequence of the change to the error messages, removed the use of MessageBuilder. JEUtils.java: ADDED Factorized all the code closing JE Transactions. DraftCNDB.java, JEChangeNumberIndexDB.java, ReplicationDB.java: Let ChangelogExceptions propagate up. Used JEUtils.abort(). Consequence of the change to the error messages, removed the use of MessageBuilder. JEReplicaDB.java: Handled ChangelogException bubbling up here. Extracted stop(Exception) method. ReplicationDbEnv.java removed one shutdownOnException() method. Inlined innerShutdownOnException(). Consequence of the change to the error messages, removed the use of MessageBuilder. git-svn-id: https://svn.forgerock.org/opendj/trunk@10018 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Code cleanup: removed code that has been obsoleted by having the separate ChangeNumberIndexer thread. Matt and I think that this code was necessary because the change number was computed lazily. Now that the change number is computed eagerly, there is no need for this obsolete code. Additional potential work that might be done later: - Could we remove the counter records from the replicaDBs? - Could we remove ECLServerHandler.eligibleCSN()? ReplicationServer.java: In getECLChangeNumberLimits(): - removed the for loop inferring the "eligibleCount", i.e. the number of changes that are in the replicaDBs but not yet in the ChangeNumberIndexDB - removed all the parameters which are now useless ReplicationServerDomain.java, ReplicationDomainDB.java, JEChangelogDB.java, JEReplicaDB.java, ReplicationDB.java: Transitively removed all the methods that were called by ReplicationServer.getECLChangeNumberLimits(). ECLServerHandler.java, FirstChangeNumberVirtualAttributeProvider.java, LastChangeNumberVirtualAttributeProvider.java: Removed all the code that was getting and passing in the parameters of ReplicationServer.getECLChangeNumberLimits(). ExternalChangeLogTest.java: Removed now useless test ECLReplicationServerFullTest10(). JEReplicaDBTest.java: Renamed testDbCounts() to testGetOldestNewestCSNs(). Removed now useless test testGetCountNoCounterRecords() git-svn-id: https://svn.forgerock.org/opendj/trunk@10016 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@10014 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
…n of a replicated server Code review: Matthew Swift Problem lied in the MonitoringPublisher thread which sends the monitoring information at regular intervals (60s by default). In run(), code was waiting for 60s then happily sending the monitor message regardless of whether the server was shutting down. However, if the thread is notified by shutdown process while waiting 60s, then it will immediately try to send the monitor message. Since the shutdown is initiated, it will receive a SocketException when trying to send a monitor message. This exception is then logged. Fix consisted in checking whether the server is shutting down right after being notified. MonitoringPublisher.java: Removed shutdown instance field (superseded by initiateShutdown() and isShuttingDown()). In run(), moved the call to wait(long) at the end of the loop, so a notification will be immediately followed by a check on whether the server is shutting down + also added a shutdown check in the body of the loop. In shutdown(), called initiateShutdown() before entering the synchronized block + moved the logging code outside of the synchronized block. In waitForShutdown(), used Thread.join(long) instead of ill looking code. git-svn-id: https://svn.forgerock.org/opendj/trunk@10010 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
…ts and replicas shutting down Replica heartbeats are now making the medium consistency point move forward. This brings trunk implementation to be on par with OpenDJ 2.6.0. ReplicationServerDomain.java: In getEligibleCSN(), used ReplicationDomainDB.getDomainLastAliveCSNs(). Removed field ctHeartbeatState + methods getChangeTimeHeartbeatState() and storeReceivedCTHeartbeat(), all superseded by ChangeNumberIndexer. ExternalChangeLogTest.java Consequence of removing ReplicationServerDomain.getChangeTimeHeartbeatState(). Improved the code readability with waitOpResult() + moved calls to waitOpResult() inside searchOnChangelog(). ReplicationDomainDB.java, JEChangelogDB.java: Added and implemented getDomainLastAliveCSNs(). In getDomainOldestCSNs() and getDomainNewestCSNs(), improved javadocs. ChangeNumberIndexer.java: Remain lastSeenUpdates field to lastAliveCSNs + improved javadoc. Added getDomainLastAliveCSNs(). MultiDomainServerState.java Added getServerState(DN). git-svn-id: https://svn.forgerock.org/opendj/trunk@10008 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Checkpoint commit that: - adds i18n - improves comments and javadocs - improved ServerState class to internally use a lock free implementation replication.properties: Added 2 error messages. ServerState.java: Made the implementation use ConcurrentMap + removed all synchronized blocks + significantly change the code in update(), removeCSN() and toString(). Removed getMaxCSN() (never used). ServerStateTest.java: Added asserts to testRemoveCSN(). git-svn-id: https://svn.forgerock.org/opendj/trunk@10007 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
…gning password policy via collective attribute git-svn-id: https://svn.forgerock.org/opendj/trunk@10004 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
This commit means we are temporarily on the release candidate doc build plugin, which I'm leaving at 2.0.0-SNAPSHOT. git-svn-id: https://svn.forgerock.org/opendj/trunk@10003 41b1ffd8-f28e-4786-ab96-9950f0a78031
16 Dec, 2013
1 commit
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@9997 41b1ffd8-f28e-4786-ab96-9950f0a78031
13 Dec, 2013
8 commits
-
Regression introduced by r9970. virtualAttributeConfigManager is null by default, but some code expected it to not be null. DirectoryServer.java: Made sure the virtualAttributeConfigManager is never null + inlined the remainings of initializeVirtualAttributes(). Applied generics + fixed formatting and typos. git-svn-id: https://svn.forgerock.org/opendj/trunk@9989 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Code cleanup, thanks AutoRefactor. git-svn-id: https://svn.forgerock.org/opendj/trunk@9988 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@9985 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Most of the replace was done by global search replace from Eclipse via regular expressions. Individual files had incorrect headers or badly formatted ones, so some of them have been done manually by replacing the content between CDDL HEADER START and CDDL HEADER END. Some headers were quoting "trunk/opends/resource/legal-notices/CDDLv1_0.txt" while it should have been "legal-notices/CDDLv1_0.txt". Removed: - resource/legal-notices/OpenDS.LICENSE The following required manual changes: - build.xml - ext/checkstyle/opendj.sourceheader - resource/admin/java-utilities.xsl - src/build-tools/org/opends/build/tools/ProcessFilesForPackages.java - src/build-tools/windows/* - src/pkg/opends-dsml-gateway_proto.py - src/pkg/opends_proto.py - src/server/org/opends/server/util/ServerConstants.java - tests/staf-tests/functional-tests/shared/data/aci/aci_targattrfilter/add_aci18.ldif - tests/staf-tests/build.bat An incorrect header mentionning "exclude" instead of "include" in the copyright header existed for: tests/staf-tests/functional-tests/testcases/backends/backup/**/* Some files have no copyright headers at all. I did not update them. Here is some of them (more exist): - tests/staf-tests/functional-tests/shared/data/core/psearch/**/*.ref - tests/staf-tests/functional-tests/shared/data/core/psearch/**/delete.ldif git-svn-id: https://svn.forgerock.org/opendj/trunk@9984 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Most of the replace was done by global search replace from Eclipse via regular expressions. Individual files had incorrect headers or badly formatted ones, so some of them have been done manually by replacing the content between CDDL HEADER START and CDDL HEADER END. Some headers were quoting "trunk/opends/resource/legal-notices/CDDLv1_0.txt" while it should have been "legal-notices/CDDLv1_0.txt". Removed: - resource/legal-notices/OpenDS.LICENSE The following required manual changes: - build.xml - ext/checkstyle/opendj.sourceheader - resource/admin/java-utilities.xsl - src/build-tools/org/opends/build/tools/ProcessFilesForPackages.java - src/build-tools/windows/* - src/pkg/opends-dsml-gateway_proto.py - src/pkg/opends_proto.py - src/server/org/opends/server/util/ServerConstants.java - tests/staf-tests/functional-tests/shared/data/aci/aci_targattrfilter/add_aci18.ldif - tests/staf-tests/build.bat An incorrect header mentionning "exclude" instead of "include" in the copyright header existed for: tests/staf-tests/functional-tests/testcases/backends/backup/**/* Some files have no copyright headers at all. I did not update them. Here is some of them (more exist): - tests/staf-tests/functional-tests/shared/data/core/psearch/**/*.ref - tests/staf-tests/functional-tests/shared/data/core/psearch/**/delete.ldif git-svn-id: https://svn.forgerock.org/opendj/trunk@9982 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
…o TRUE which causes an error in post ugrade task (rebuild-index) git-svn-id: https://svn.forgerock.org/opendj/trunk@9981 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
In testGenerateDoc(), added the @Test annotation + ensured the property set is cleared at the end of the test. git-svn-id: https://svn.forgerock.org/opendj/trunk@9980 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@9979 41b1ffd8-f28e-4786-ab96-9950f0a78031
12 Dec, 2013
5 commits
-
VirtualAttributeProvider.java: Pulled up the empty implementations of initializeVirtualAttributeProvider(). Fixed typos. *.java: Consequence of pulling up empty implementations of initializeVirtualAttributeProvider(). Automatic + manual code cleanups. git-svn-id: https://svn.forgerock.org/opendj/trunk@9972 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
See the test failure stack trace at the bottom of this commit message. ECLReplicationServerPreTest(), the very first test of ExternalChangeLogTest, expects external changelog to be disabled. However, when GroupIdHandshakeTest was run before ExternalChangeLogTest but never removed ECL virtual attributes. This led to the "lastChangeNumber" virtual attribute having an actual value of "0" while it was expected it would not exist on the returned entry. Moved the total responsibility of maintaining the virtual attributes to VirtualAttributeConfigManager. Ensured the ECL virtual attributes are removed on ECL shutdown. VirtualAttributeConfigManager.java: Do not call anymore the DirectoryServer.(de)registerVirtualAttribute() methods. Added getVirtualAttributes(), register(), deregister(), getDummyDN(). In loadProvider(), removed the use of reflection. DirectoryServer.java: Removed virtualAttributes field. Delegated getVirtualAttributes(), registerVirtualAttribute(), deregisterVirtualAttribute() calls to VirtualAttributeConfigManager. Removed replaceVirtualAttribute(). ReplicationServer.java: Renamed externalChangeLogWorkflowID field to eclWorkflowID and externalChangeLogWorkflowImpl field to eclWorkflowImpl. Changed eclWorkflowImpl to use an AtomicReference. In enableECL(), used AotmicReference.compareAndSet() to avoid multiple threads initializing at the same time. Renamed enableECLVirtualAttr() to buildVirtualAttributeRule() + extracted the call to DirectoryServer.registerVirtualAttribute() outside. In buildVirtualAttributeRule(), used Collections.* methods. In shutdownECL(), deregister the virtual attributes added by the enableECL(). [testng] T E S T F A I L U R E ! ! ! [testng] [testng] Failed Test: org.opends.server.replication.server.ExternalChangeLogTest#ECLReplicationServerPreTest [testng] Failure Cause: java.lang.AssertionError: expected:<null> but was:<0> [testng] org.testng.Assert.fail(Assert.java:84) [testng] org.testng.Assert.failNotEquals(Assert.java:438) [testng] org.testng.Assert.assertEquals(Assert.java:108) [testng] org.testng.Assert.assertEquals(Assert.java:129) [testng] org.testng.Assert.assertEquals(Assert.java:139) [testng] org.opends.server.replication.server.ExternalChangeLogTest.ECLCompatTestLimits(ExternalChangeLogTest.java:2560) [testng] org.opends.server.replication.server.ExternalChangeLogTest.ECLIsNotASupportedSuffix(ExternalChangeLogTest.java:407) [testng] org.opends.server.replication.server.ExternalChangeLogTest.ECLReplicationServerPreTest(ExternalChangeLogTest.java:167) git-svn-id: https://svn.forgerock.org/opendj/trunk@9971 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Code review: Matthew Swift build.xml: Removed special checks checkstyle for org.opends.server.api, org.opends.server.protocols.internal, org.opends.server.types packages. Matt said they were added to ease embedding code into the docs, but this never happened, so this feature is basically dead. Extracted property named "buildtools.jar" opends-doctarget-checkstyle.xml: REMOVED git-svn-id: https://svn.forgerock.org/opendj/trunk@9970 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Code cleanup git-svn-id: https://svn.forgerock.org/opendj/trunk@9968 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Extracted methods createRule(), buildFilters(), areFiltersAcceptable(). In loadProvider(), called StaticUtils.collectionToString(). git-svn-id: https://svn.forgerock.org/opendj/trunk@9967 41b1ffd8-f28e-4786-ab96-9950f0a78031
11 Dec, 2013
4 commits
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@9962 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@9961 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Extracted method hasGroupMembershipUpdateControl(). In loadGroup(), used StaticUtils.collectionToString(). Automatic code cleanups. git-svn-id: https://svn.forgerock.org/opendj/trunk@9960 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
SetPropSubCommandHandler.java: Extracted methods parseValue() and getPropertyDefinition(). Argument.java: Improved the toString() + javadocs. Minor code cleanups. ArgumentParser.java: Removed one parseArguments() method - never used. Extracted method indentAndWrap() to match SubCommandArgumentParser. Minor code cleanups. SubCommandArgumentParser.java: Removed one parseArguments() method - never used. Minor code cleanups. DsconfigOptionsTestCase.java: Added testGenerateDoc(). Minor code cleanups. git-svn-id: https://svn.forgerock.org/opendj/trunk@9959 41b1ffd8-f28e-4786-ab96-9950f0a78031
10 Dec, 2013
4 commits
-
* ensure that temporary enviroment is always closed. git-svn-id: https://svn.forgerock.org/opendj/trunk@9955 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@9953 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Implemented toString(). Code cleanup. git-svn-id: https://svn.forgerock.org/opendj/trunk@9951 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@9950 41b1ffd8-f28e-4786-ab96-9950f0a78031
09 Dec, 2013
1 commit
-
…ach import. This shouldn't be necessary since there is only one suffix per backend. git-svn-id: https://svn.forgerock.org/opendj/trunk@9949 41b1ffd8-f28e-4786-ab96-9950f0a78031