07 Jan, 2014
1 commit
-
CR-2785. git-svn-id: https://svn.forgerock.org/opendj/trunk@10090 41b1ffd8-f28e-4786-ab96-9950f0a78031
06 Jan, 2014
1 commit
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@10082 41b1ffd8-f28e-4786-ab96-9950f0a78031
03 Jan, 2014
9 commits
-
Used EnvironmentConfig as a static import to configure JE. BackendImpl.java: Used EnvironmentConfig as a static import to configure JE. Called getReadOnlyRootContainer() to remove duplicated code. Extracted methods closeTemporaryRootContainer() and getEnvConfigForImport() to remove duplicated code. In exportLDIF(), removed many redundant catch blocks and replaced them with only one for IdentifiedException. javadoc cleanup. ConfigurableEnvironment.java, Importer.java, ReplicationDbEnv.java: Used EnvironmentConfig as a static import to configure JE. git-svn-id: https://svn.forgerock.org/opendj/trunk@10080 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Problem was due to the CNIndexDB state not being properly cleaned up. I chose to rely on ReplicationTestCase.remove(ReplicationServer) to clean up the state of the ChangeNumberIndexDB. JEChangelogDB.java: Extracted getChangeNumberIndexDB(boolean) from getChangeNumberIndexDB(). JEChangeNumberIndexDB.java: Removed trimDone field. In shutdown(), used Thread.join(). In run(), removed duplicated code that I unfortunately added there in r9881. JEChangeNumberIndexDBTest.java: Replaced newCNIndexDB() with getCNIndexDBNoTrimming() + Removed createCleanDir() + relied on ReplicationTestCase.remove(ReplicationServer) to clean up the state of the ChangeNumberIndexDB. git-svn-id: https://svn.forgerock.org/opendj/trunk@10079 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Fixed an infinite loop after r10071 (Why did it not fail when ran locally?) + extracted method assertOnlyNewestRecordIsLeft(). testClean() this test is still failing in CLI mode, or when you add a dependency towards method testTrim(). I haven't fully grasped yet why is that. git-svn-id: https://svn.forgerock.org/opendj/trunk@10078 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Code cleanup. git-svn-id: https://svn.forgerock.org/opendj/trunk@10077 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
More code cleanup and encapsulation. StartECLSessionMsg.java: Introduced enums for ECLRequestType and Persistent. Completed javadocs from javadocs coming from ECLServerHandler. ECLServerHandler.java: Replaced individual fields by directly storing the StartECLSessionMsg object. Changed visibility to private in a few places. Replaced isPersistent() by isNonPersistent() and getSearchPhase() by isInitPhaseDone(). ECLServerWriter.java Used better encapsulated methods from ECLServerHandler. ECLSearchOperation.java, SynchronizationMsgTest.java: Consequence of the changes to StartECLSessionMsg. git-svn-id: https://svn.forgerock.org/opendj/trunk@10076 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Removed duplicate code creating error messages for "badly disconnected" server handlers. Follow up on r10074. ServerWriter.java: Removed catch NoSuchElementException for an Exception never thrown. Factorized + formatted some code. git-svn-id: https://svn.forgerock.org/opendj/trunk@10075 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Removed duplicate code creating error messages for "badly disconnected" server handlers. Reduced coupling by moving a call to ECLServerHandler.refreshEligibleCSN() directly inside ECLServerHandler.takeECLUpdate() + reduced refreshEligibleCSN() visibility to private. git-svn-id: https://svn.forgerock.org/opendj/trunk@10074 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
… fake LDAP replication domains, so they can participate in the external changelog. git-svn-id: https://svn.forgerock.org/opendj/trunk@10073 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
… fake LDAP replication domains, so they can participate in the external changelog. git-svn-id: https://svn.forgerock.org/opendj/trunk@10072 41b1ffd8-f28e-4786-ab96-9950f0a78031
02 Jan, 2014
6 commits
-
Never trim the newest (last) record in the ChangeNumberIndexDB from production code. This last record contains the last published change number, which is the one that must be read on startup and used to compute the following monotonically increasing change numbers. JEChangeNumberIndexDB.java: Improved and fixed javadocs. In ctor, factorized code doing twice the same thing. In addRecord(), updated the newestChangeNumber after a newest record is committed. In clear(DN, AtomicBoolean), updated the oldestChangeNumber + do not trim the newest record from the DB. JEChangeNumberIndexDBTest.java: Updated testClear() to assert the newest record is never trimmed by production code. git-svn-id: https://svn.forgerock.org/opendj/trunk@10071 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Updated copyright. git-svn-id: https://svn.forgerock.org/opendj/trunk@10070 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
…ated a fake domain for it, so it participates in the external changelog. git-svn-id: https://svn.forgerock.org/opendj/trunk@10069 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@10068 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
ChangeNumberIndexer.java: Removed useless boolean parameter from ensureCursorExists(). Changed visibility of getPrecedingCSN() to unit test it. ChangeNumberIndexerTest.java: Added tests for ChangeNumberIndexer.getPrecedingCSN(). git-svn-id: https://svn.forgerock.org/opendj/trunk@10067 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
BoundedWorkQueueStrategy.java: Extracted calls to undesired DirectoryServer static methods into overridable methods. BoundedWorkQueueStrategyTest.java: ADDED git-svn-id: https://svn.forgerock.org/opendj/trunk@10066 41b1ffd8-f28e-4786-ab96-9950f0a78031
23 Dec, 2013
5 commits
-
The problem was due to incorrect code factorization around cursor creation: When creating the cursors, the startAfterCSN to use in different depending on where we come from: - during ChangeNumberIndexer initialization, the cursors are already created from the previous cookie, so the provided CSN is the one to use - on publishUpdateMsg(), we want the cursor to start exactly with the provided CSN, so we need to create the cursor with the immediately preceding CSN. ChangeNumberIndexer.java: In ensureCursorExists(), added boolean parameter startFromPrecedingCSN. Added lots of comments. git-svn-id: https://svn.forgerock.org/opendj/trunk@10055 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
ListenerThread was 100% implemented in terms of ReplicationDomain method calls. It should therefore be part of ReplicationDomain. * inline ListenerThread into ReplicationDomain and use new DirectoryThread lifecycle methods * remove shutdown parameter from ReplicationDomain.processUpdate() * reduce visibility of ReplicationDomain.receive() * inline ReplicationDomain.processUpdateDoneSynchronous(). git-svn-id: https://svn.forgerock.org/opendj/trunk@10054 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
-
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
20 Dec, 2013
12 commits
-
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
-
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
-
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
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