23 Dec, 2013
6 commits
-
* Refactor and clean ConstraintTest in admin.server package ** Tests are running without server start ** Use data providers for better readability and less code duplication * Factorize some common helper methods in AdminTestCase class git-svn-id: https://svn.forgerock.org/opendj/trunk@10053 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
* ensure that changes are not added to the replay queue twice, e.g. during recovery when the queue already contains uncommitted changes. git-svn-id: https://svn.forgerock.org/opendj/trunk@10052 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
** Localize exception ** Return exception for all edge cases ** Add two new messages in core.properties for edge cases * Add two new convenience methods LDIF makeEntries and makeEntry that accepts List<String> * Adapt unit tests to changes git-svn-id: https://svn.forgerock.org/opendj/trunk@10051 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Use LinkedHashMap when filter entries before returning them in search results. This ensures that attributes are mostly returned in the same order that they were requested. I use the word "mostly" because user attributes will still be grouped together ahead of operational attributes. Verbally reviewed by Ludo. git-svn-id: https://svn.forgerock.org/opendj/trunk@10050 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
The medium consistency point was not progressing on DSRS 2 because the ChangeNumberIndexer mediumConsistencyCSN had been polluted by CSN from "cn=admin data". Problem is that ChangeNumberIndexer's publishUpdateMsg() was filtering out updates from ECL disabled domains, but not from domains unknown to ECL. On start up, update messages can be received from replication domains have not been been configured yet on the current replication server. The fix consists in only updating the medium consistency point with update messages or replica heartbeats coming from explicitly enabled replication domains. After this fix, changes from ECL disabled domains will still be stored in dedicated replicaDBs, there is no change in this functionality. MultimasterReplication.java Renamed isECLDisabledDomain() to isECLEnabledDomain() so it caters better for the 3 states of the domains: enabled, disabled and unknown Code cleanup. ChangeNumberIndexer.java: Extracted method isECLEnabledDomain() to use as a seam for unit testing which calls to MultimasterReplication.isECLEnabledDomain(). ChangeNumberIndexerTest.java Added one test emptyDBThreeInitialDSsOneIsNotECLEnabledDomain(). Renamed assertAddedRecords() to assertExternalChangelogContent(), startIndexer() to startCNIndexer(), stopIndexer() to stopCNIndexer() and indexer to cnIndexer. In startCNIndexer(), overrode ChangeNumberIndexer.isNotECLEnabledDomain(). AttributeTypeConstants.java: Added support for "cn" git-svn-id: https://svn.forgerock.org/opendj/trunk@10049 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
* Refactor and clean DefaultBehaviorTest in admin.server package ** Tests are running without server start ** Use data providers for better readability and less code duplication * Fix issues in ServerManagementContext due to incorrect migration from server code ** Decoding of attributes was returning only the first value of multivalued attributes * Minor naming cleanup git-svn-id: https://svn.forgerock.org/opendj/trunk@10048 41b1ffd8-f28e-4786-ab96-9950f0a78031
20 Dec, 2013
15 commits
-
* Add both methods to Entries class as well (indirection to LDIF implementations). * Add test for both methods in LDIFTestCase. git-svn-id: https://svn.forgerock.org/opendj/trunk@10047 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Prevent instantiating a HashSet for every replica heartbeat or UpdateMsg. MultimasterReplication.java: Added isECLDisabledDomain(DN). ChangeNumberIndexer.java: Removed isExcludedFromECL(), replaced by MultimasterReplication.isECLDisabledDomain(). git-svn-id: https://svn.forgerock.org/opendj/trunk@10046 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Christophe reported to me that functional tests with the changeNumber were failing. After investigation on my side, it turns out that the mediumConsistencyCSN was blocked on a "cn=admin data" or "cn=schema" CSN. Fix consists in excluding these domains in ChangeNumberIndexer's publishHeartbeat() and publishUpdateMsg() methods. ChangeNumberIndexer.java: Added isExcludedFromECL() + used it from publishHeartbeat() and publishUpdateMsg() to exclude undesired domains. git-svn-id: https://svn.forgerock.org/opendj/trunk@10045 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Ensured ReplicationDomainDB.getDomainLastAliveCSNs() never returns null. git-svn-id: https://svn.forgerock.org/opendj/trunk@10044 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
* Fix DNBuilderTest git-svn-id: https://svn.forgerock.org/opendj/trunk@10043 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
ExternalChangeLogSession.java, ExternalChangeLogSessionImpl.java: REMOVED ReplicationServer.java: Inlined createECLSession(). ECLSearchOperation.java: Changed field ExternalChangeLogSession eclSession into ECLServerHandler eclServerHandler. Converted startECLSessionMsg field to local variable. Added method shutdownECLServerHandler(). git-svn-id: https://svn.forgerock.org/opendj/trunk@10042 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
* Refactor server classes to remove ConfigEntry class ** Move listener registration from ConfigEntry to ConfigurationRepository ** Use DN to register or retrieve listeners ** Use Entry in ConfigXXXListener classes * Refactor server classes to remove ServerManagementContext singleton ** Server context is passed as argument in constructors * Migrate test cases from org.opends.server.admin.server package ** Rewrite ListenerTest class to test listeners without server start, using mocks ** Other test cases are not working yet git-svn-id: https://svn.forgerock.org/opendj/trunk@10041 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
ReplicationTestCase.java Removed emptyOldChanges parameter from openReplicationSession() methods because it has no effect whatsoever. ReplicationServerTest.java: Overrode openReplicationSession() to also check the broker is connected. InitOnLineTest.java: Stopped constantly calling DN.decode() and used instance variable instead. *.java: Consequence of the changes to ReplicationTestCase. git-svn-id: https://svn.forgerock.org/opendj/trunk@10040 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@10039 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Extracted duplicated code into methods cleanup(), getArchiveFile() Added a couple of FIXME comments around dubious or clumsy code portions git-svn-id: https://svn.forgerock.org/opendj/trunk@10038 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Had to change integrated unit tests to pass a dummy replication domain. ReplicationBroker.java: Removed null checks on the domain. DummyReplicationDomain.java: ADDED ReplicationTestCase.java: Removed the replicationDomain parameter which were always passed as null. Could remove one openReplicationSession() method. Passed in a DummyReplicationDomain when creating a ReplicationBroker. ExternalChangeLogTest.java, ReplicationServerTest.java, HistoricalCsnOrderingTest.java, StateMachineTest.java: Passed in a DummyReplicationDomain when creating a ReplicationBroker. Also consequence of removing the replicationDomain parameter in ReplicationTestCase.openReplicationSession(). git-svn-id: https://svn.forgerock.org/opendj/trunk@10037 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Fixed compile error. git-svn-id: https://svn.forgerock.org/opendj/trunk@10036 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
ReplicationBroker.java: Reinstated previous code behaviour (somewhat unclear) where the session can directly be used right after performPhaseTwoHandshake() succeeds. git-svn-id: https://svn.forgerock.org/opendj/trunk@10035 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
ReplicationDomain.java, LDAPReplicationDomain.java: Removed unused parameters from sessionInitiated(). Inlined Message passed into logError(). ReplicationBroker.java: Consequence of the change to ReplicationDomain.sessionInitiated(). Extracted method mustAvoidYoyoEffect(). git-svn-id: https://svn.forgerock.org/opendj/trunk@10034 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
ReplicationDomain.java: Added missing curly brackets. Added IEContext.setExceptionIfNoneExist() + used it throughout. LDAPReplicationDomain.java: In decodeSource(), removed insane control flow. Called StaticUtils.stackTraceToSingleLineString() instead of Exception.getLocalizedMessage() or Exception.getMessage(). Collapsed @inheritDoc javadocs. git-svn-id: https://svn.forgerock.org/opendj/trunk@10033 41b1ffd8-f28e-4786-ab96-9950f0a78031
19 Dec, 2013
8 commits
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@10031 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
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
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@10029 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@10026 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
2 commits
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@10023 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@10022 41b1ffd8-f28e-4786-ab96-9950f0a78031
17 Dec, 2013
9 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
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@10017 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@10015 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@10014 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
* Migrate all tests from org.opends.server.admin.client.ldap package ** Remove server start from all tests * Fixes in LDAPManagedObject and LDAPNameBuilder classes : wrong code conversion from javax.naming classes to SDK DN/RDN classes git-svn-id: https://svn.forgerock.org/opendj/trunk@10013 41b1ffd8-f28e-4786-ab96-9950f0a78031