04 Oct, 2013
7 commits
-
* fix minor behavior change introduced in r9660. git-svn-id: https://svn.forgerock.org/opendj/trunk@9663 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Renamed some classes in package src.server.org.opends.server.replication.server.changelog.je: - DbHandler.java => JEReplicaDB.java (and tests) - DraftCNDbHandler.java => JEChangeNumberIndexDB.java (and tests) - DraftCNDbIterator.java => JEChangeNumberIndexDBCursor.java *.java: Consequence of the renames. Changed methods/variables/parameter names and comments to reflect the new names. In particular, bye bye to DraftCNDb, DbHandler and welcome to CNIndexDB and ReplicaDB. git-svn-id: https://svn.forgerock.org/opendj/trunk@9662 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
* remove serverId parameter from ReplicationDomainDB.getCount(DN, int, CSN, CSN) git-svn-id: https://svn.forgerock.org/opendj/trunk@9661 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
* convert ServerState to implement Iterable<CSN> instead of Iterable<Integer> git-svn-id: https://svn.forgerock.org/opendj/trunk@9660 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Changes after review from Matthew Swift. ReplicationServerDomain.java Renamed changelogDB field to domainDB + changed type. ChangelogDB.java, JEChangelogDB.java: Extracted interface ReplicationDomainDB from this interface. Added getReplicationDomainDB(). ReplicationDomainDB.java: ADDED git-svn-id: https://svn.forgerock.org/opendj/trunk@9659 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Changes after review from Matthew Swift. ChangelogDB.java, JEChangelogDB.java: Removed getDBDirectoryName(), not needed anymore. In getDomainServerIds(), now return an unmodifiable set. In getDomainOldestCSNs() and getDomainNewestCSNs(), now return a ServerState object. ReplicationServerDomain.java: Consequence of the change to ChangelogDB. ReplicationServer.java Consequence of the change to ChangelogDB. Added config instance field + removed all the instance field that are duplicating its info + added getConfiguredRSAddresses() to replace toHostPorts() + adapted the code + moved some javadocs. git-svn-id: https://svn.forgerock.org/opendj/trunk@9658 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
LDAPReplicationDomain.replay() may lose error messages after too many replay attempts if "op" gets overwritten. LDAPReplicationDomain.java: In replay(): - Added the "nextOp" local variable so the code can keep error messages in the "op" local variable until the next loop iteration starts. - Reduced as much as possible the scope of local variables to avoid the need to reinitialize them. - Renamed "newOp" local variables to "castOp" git-svn-id: https://svn.forgerock.org/opendj/trunk@9657 41b1ffd8-f28e-4786-ab96-9950f0a78031
03 Oct, 2013
2 commits
-
These changes are adding a new optional configuration parameter : rmi-port, to allow specifying a fixed port for the RMI connection underlying JMX. This is required when managing applications need to connect to OpenDJ through a firewall. CR-2429. git-svn-id: https://svn.forgerock.org/opendj/trunk@9655 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
This code is never used + UpdateMsg already implements Comparable. git-svn-id: https://svn.forgerock.org/opendj/trunk@9647 41b1ffd8-f28e-4786-ab96-9950f0a78031
02 Oct, 2013
5 commits
-
Fixed a compile error (how did it slip through?) introduced in r9642 with a change that disabled Berkeley JE database stats collection in order to not incur performance problems. git-svn-id: https://svn.forgerock.org/opendj/trunk@9643 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
ChangelogDB.java: In removeDomain(), now throws ChangelogException. JEChangelogDB.java: In clearDB(), only clear the DB if the directory exists on disk. In removeDomain() and shutdownDomain(), removed the entry associated to the baseDN key. In removeDomain(), now throw ChangelogException + moved exception handling to ReplicationServerDomain.clearDbs(). ReplicationServerDomain.java: In clearDbs(), moved the exception handling here from lower level JEChangelogDB.removeDomain(). ReplicationDbEnv.java: Added allDbs and isShuttingDown fields to record all created Databases and mark when shutting down is in progress. In openDatabase(), throw exceptions when the DB is shutting down. In shutdown(), close all the opened DBs. Added closeDB() and newErrorMessage(). In clearGenerationId(), clearServerId() and deleteFromChangelogStateDB(), now throw ChangelogException. In clearDb(), changed parameter from String to Database. DraftCNDB.java, ReplicationDB.java: In clear(), rely more on ReplicationDbEnv.clearDb(Database). In isDBClosed(), added more conditions. ReplicationTestCase.java: Removed useless call to cleanUpReplicationServersDB() before removeReplicationServerDB(). Added remove(Collection<ReplicationServer>) to factorize code between removeReplicationServerDB() and remove(ReplicationServer...). ReplicationServerTest.java: Removed all calls to clearChangelogDB() before calling changelogBasic(), because this is the first thing the latter method does. Added getCSNFieldName() to have more explicit failures. In windowProbeTest(), used HostPort. ECLServerHandler.java: Removed never thrown DirectoryException. git-svn-id: https://svn.forgerock.org/opendj/trunk@9642 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Test started failing after upgrading to Berkeley JE "5.0.84" (instead of "5.0.73"). The newer version has StatCapture class that writes to disk on shutdown which is creating a problem with JEChangelodDB.removeDB(). JEChangelodDB.java: In removeDB(), reversed the order: shutdown the DB before deleting the DB directory. git-svn-id: https://svn.forgerock.org/opendj/trunk@9641 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
ConfigEntry.java: Changed toString(), to only output the DN of the entry to prevent: - dumping excessively large entries - developers to inadvertently dump sensitive information in the logs git-svn-id: https://svn.forgerock.org/opendj/trunk@9640 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Added toString(), that displays the entry field. Comments => Javadoc. git-svn-id: https://svn.forgerock.org/opendj/trunk@9639 41b1ffd8-f28e-4786-ab96-9950f0a78031
01 Oct, 2013
4 commits
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@9633 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
The refreshToken was updated on each add/mod/delete regardless of the type of entry, causing intensive contention on group membership evaluation. Changes include reduction of the critical section as well as moving the update of refreshToken only when groups are modified. CR-2400, thanks to the nice reviewers. git-svn-id: https://svn.forgerock.org/opendj/trunk@9632 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Removed ReplicationServer.removeDb() + let the exceptions propagate up in ChangelogDB.shutdownDB() and ChangelogDB.removeDB(). ReplicationServer.java: Removed removeDb(), instead use JEChangelogDB.removeDB(). ChangelogDB.java: shutdownDB() and removeDB() can now throw ChangelogException. JEChangelogDB.java: shutdownCNIndexDB(), shutdownDB() and removeDB() can now throw ChangelogException + ensured code proceed till the end of the methods before throwing the first caught exception. In removeDB(), called shutdownDB(). *Test[Case].java: Allowed exceptions to propagate up, this will allow detecting issues in tests suite. git-svn-id: https://svn.forgerock.org/opendj/trunk@9629 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Removed clearDB() from ChangelogDB API because it is only used in tests. ReplicationServer.java: Removed clearDb(), instead use JEChangelogDB.cleanDB(). ChangelogDB.java: Removed clearCNIndexDB(). Test only: do not expose it via interface. JEChangelogDB.java Renamed clearCNIndexDB() to clearDB(). ReplicationTestCase.java: Added clearChangelogDB(). *Test.java: Called clearChangelogDB() instead of ReplicationServer.clearDb(). git-svn-id: https://svn.forgerock.org/opendj/trunk@9628 41b1ffd8-f28e-4786-ab96-9950f0a78031
30 Sep, 2013
5 commits
-
Moved the cnIndexDB + related code to the ChangelogDB implementation because under its responsibility. ReplicationServer.java: Moved cnIndexDB + related code to JEChangelogDB. Moved clearGenerationId() code to JEChangelogDB.removeDomain(). ReplicationServerDomain.java: The code ReplicationServer.clearGenerationId(). ChangelogDB.java: Temporarily added clearCNIndexDB until I can sort out the can of worms created by folding this method into other methods. Renamed newChangeNumberIndexDB() to getChangeNumberIndexDB(). JEChangelogDB.java Moved cnIndexDB + related code here from ReplicationServer. git-svn-id: https://svn.forgerock.org/opendj/trunk@9626 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Moved the lastGeneratedChangeNumber to the ChangeNumberIndexDB implementation because it is the responsibility of the DB to manage such field (think of it like relational databases's sequence numbers). ReplicationServer.java: Moved lastGeneratedChangeNumber + relevant code to DraftCNDbHandler. Removed getNewChangeNumber(), replaced with TODO ChangeNumberIndexDB.getLastGeneratedChangeNumber() DraftCNDbHandler.java Moved lastGeneratedChangeNumber here and converted it to AtomicLong + moved relevant code here from ReplicationServer. In getMonitorData(), extracted methods, createChangeNumberAttribute() and getChangeNumber(). ChangeNumberIndexDB.java: Added nextChangeNumber() and getLastGeneratedChangeNumber(). ECLServerHandler.java: Consequence of the changes to ReplicationServer. git-svn-id: https://svn.forgerock.org/opendj/trunk@9624 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
… should never be called this way in production, so I moved it back to tests. CSNGenerator.java: Moved newCSNs() to DbHandlerTest. CSNGeneratorTest.java: Renamed newCSNs() test to newCSN() DbHandlerTest.java: Moved newCSNs() here from CSNGenerator. DraftCNDbHandlerTest.java: Used DbHandlerTest.newCSNs(). git-svn-id: https://svn.forgerock.org/opendj/trunk@9621 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
ChangelogDB.java: Updated javadoc for getCSNAfter(). CSNGenerator.java Added newCSNs(int) to generate a certain number of CSNs in one go. It is very useful in tests. CSNGeneratorTest.java Added a test for newCSNs(int). ReplicationServer.java: In getChangelogDB(), weakened visibility from private to default for unit tests access. JEChangelogDB.java: In getOrCreateDbHandler(), weakened visibility from private to default for unit tests access. DbHandlerTest.java: Cleaned up the tests by relying on production code methods cleanups. Used CSNGenerator(.newCSNs(). Added newDbHandler(), testGenerateCursorFrom(). Renamed/inlined a few local variables. DraftCNDbHandlerTest.java: Cleaned up the tests by relying on production code methods cleanups. Used CSNGenerator(.newCSNs(). Added newDbHandler(). PendingChange.java, ExternalChangeLogTest.java: Renamed "changeNumber" to "csn". git-svn-id: https://svn.forgerock.org/opendj/trunk@9620 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
In parseJsonConfiguration(), removed an outdated comment (already implemented). git-svn-id: https://svn.forgerock.org/opendj/trunk@9619 41b1ffd8-f28e-4786-ab96-9950f0a78031
26 Sep, 2013
6 commits
-
…annot be found in this JVM. CertAndKeyGen class was moved from sun.security.x509 to sun.security.tools.keytool in openjdk8. Now checking JVM version to figure out the path. CR-2376. git-svn-id: https://svn.forgerock.org/opendj/trunk@9610 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Changes after review from Matt. ChangelogDB.java: Added removeDB(). Renamed clearDomain() to removeDomain(). In getCursorFrom(), never return a null Cursor anymore. Updated many javadocs. MessageHandler.java, ReplicationBackend.java: Removed null checks for cursor (consequence of the changes to ChangelogDB) ReplicationServerDomain.java, JEChangelogDB.java, JEReplicaDBCursor.java: Consequence of the changes to ChangelogDB. ReplicationServer.java: Added removeDb(). Removed getDbDirName(), superseded in usage by removeDb(). ReplicationTestCase.java, ReplicationServerTest.java: Consequence of the change to ReplicationServer. DbHandler.java, ReplicationDB.java: Renamed setCounterWindowSize() to setCounterRecordWindowSize() + updated javadoc. DbHandlerTest.java: Improved the tests. Added testGetCountNoCounterRecords() to assess code behaviour. Extracted method assertCount() CSNGenerator.java: Fixed ugly parameter name. git-svn-id: https://svn.forgerock.org/opendj/trunk@9609 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Undoing the rushed r9606 because: - In buildAndPublishMissingChanges(), the parameter was used in the tests - There were unintended changes in this git-svn-id: https://svn.forgerock.org/opendj/trunk@9607 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
LDAPReplicationDomain.java: In buildAndPublishMissingChanges(), removed ReplicationBroker parameter and used broker field instead. *Test.java: Removed try / catch / fail test anti pattern. Inlined local variables. AssuredReplicationPluginTest.java: Extracted methods assertBlockedForLessThanTimeout() assertBlockedLongerThanTimeout(), Inlined sleep(). In getErrorsByServers(), improved the code. ReplicationServerTest.java: Split changelogChaining() test into changelogChaining0() and changelogChaining1() to match the previous double testing + then simplified the code. Extracted methods receiveReplicationMsgs(), assertOnlyTopologyMsgsReceived(). Used CSNGenerator. git-svn-id: https://svn.forgerock.org/opendj/trunk@9606 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
*Msg.java: Used DN.toNormalizedString() instead of DN.toString() for better perfs. git-svn-id: https://svn.forgerock.org/opendj/trunk@9605 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
String baseDn => DN baseDN The change mostly affects package org.opends.server.replication.protocol and dependent classes. ModifyCommonMsg.java: In getMods(), called decodeMods() ReplicationTestCase.java: Converted removeDomain(Entry) to removeDomain(Entry...). git-svn-id: https://svn.forgerock.org/opendj/trunk@9601 41b1ffd8-f28e-4786-ab96-9950f0a78031
25 Sep, 2013
3 commits
-
Extracted toServerState() method. Renamed getDbServerState() to getLatestServerState(). ReplicationDomainCfgDefn_fr.properties: Upgraded "property.replication-server.description" to match the latest english description. *.java: Consequence of renaming ReplicationServerDomain.getDbServerState(). git-svn-id: https://svn.forgerock.org/opendj/trunk@9600 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Now the replication code uses HostPort class for comparisons instead of "host:port" Strings. Changed all the HostPort variable/parameter names to *Address instead of *URL. Left all the relevant String variable/parameter names to *URL. HostPort.java: Removed LocalAddress(String), not used anymore. Moved getLocalAddress() here from ReplicationServer. Created localAddress() static method. Extracted method toInetSocketAddress() and moved it here. ReplicationServer.java: Created converting method toHostPorts() + used it everywhere replicationServerUrls was accessed. Replaced getNormalizedLocalURL() and normalizeServerURL() with simply calling HostPort.localAddress() and HostPort.valueOf(). In getConnectedRSUrls(), changed return type from Set<String> to Set<HostPort>. In connect() and disconnectRemovedReplicationServers(), used HostPort as a parameter instead of String. ReplicationServerDomain.java: In stopReplicationServers(), used HostPort as a parameter instead of String. ReplicationServerHandler.java: Extracted method toServerAddressURL(). ReplicationBroker.java: Consequence of the change to HostPort. ReplSessionSecurity.java: In isSslEncryption() removed unused parameter. Used StaticUtils.close(). ReplicationServerConfiguration.xml, ReplicationServerCfgDefn.properties: Added precisions on how to specify the "replication-server" property. ReplicationServerDynamicConfTest.java, ReplServerFakeConfiguration.java: Updated because this test was failing. git-svn-id: https://svn.forgerock.org/opendj/trunk@9599 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Review CR-2353 * Removed constraints on the mandatory presence of a PIN, to allow use of empty PIN. These contraints were implemented in several places : - configuration files : FileBasedKeyManagerProviderConfiguration.xml, PKCS11KeyManagerProviderConfiguration.xml - corresponding provider classes : FileBasedKeyManagerProvider.java, PKCS11KeyManagerProvider.java - setup tool : CertificateManager.java, InstallDS.java (for CLI), SecurityOptionsDialog.java (for GUI) * Removed corresponding admin messages that are no more used in FileBasedKeyManagerProviderCfgDefn.properties and PKCS11KeyManagerProviderCfgDefn.properties * Removed corresponding messages that are no more used in extension.properties and quicksetup.properties * Added management of issue JDK-6879539 that prevents usage of empty PIN. This issue occurs on JDK older than JDK7. * Modified unit tests according to new behavior : FileBasedKeyManagerProviderTestCase.java, CertificateManagerTestCase.java * Added a new utility method StaticUtils#stackTraceContainsCause to check if an exception contains a given cause. git-svn-id: https://svn.forgerock.org/opendj/trunk@9598 41b1ffd8-f28e-4786-ab96-9950f0a78031
24 Sep, 2013
4 commits
-
Changes after review from Matt. *.java: Changed terminology for easier reading: - First => Oldest - Last => Newest git-svn-id: https://svn.forgerock.org/opendj/trunk@9590 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Changes after review from Matt. *.java: Changed terminology for easier reading: - First => Oldest - Last => Newest git-svn-id: https://svn.forgerock.org/opendj/trunk@9589 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Changed after review from Matt. ChangelogDB.java: Removed setReplicationDBDirectory(), now set in JEChangelogDB constructor. Renamed getDBDirName() to getDBDirectoryName(). Improved javadocs. JEChangelogDB.java: Consequence of the changes to ChangelogDB. Renamed dbDirName to dbDirectoryName. Made 2 fields final. Added makeDir(). ReplicationServer.java: Consequence of the changes to ChangelogDB. git-svn-id: https://svn.forgerock.org/opendj/trunk@9581 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
HostPort.java: Improved javadocs. Improved host normalization for and used remote IP addresses for remote hosts (complies with code from ReplicationServer.java.disconnectRemovedReplicationServers()). Renamed normalizedHost() tpo normalizeHost(). Removed trimming for serverURLs. In valueOf(), added a special case to reject unbracketed IPV6 addresses. Extracted constant LOCALHOST to avoid typos. Reworked the code from isLocalAddress(), equals(), hashCode(). HostPortTest.java: Reworked some tests. Added new tests. git-svn-id: https://svn.forgerock.org/opendj/trunk@9580 41b1ffd8-f28e-4786-ab96-9950f0a78031
23 Sep, 2013
3 commits
-
LDAPURL.java: Weakened urlDecode() visibility from private to package to allow easy unit testing. git-svn-id: https://svn.forgerock.org/opendj/trunk@9578 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Review CR-2344 NPE occurs in AdministrationConnector#createSelfSignedCertificateIfNeeded method. To avoid this, now attempt to create certificate only if initial setup has not been changed. * AdministrationConnector.java : - completed method createSelfSignedCertificateIfNeeded to add more checks to detect when initial setup has changed - added method hasDefaultConfigChanged to isolate the check * No unit test added, functional test to be added git-svn-id: https://svn.forgerock.org/opendj/trunk@9577 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Augmented HostPort class to support the use cases mentioned in OPENDJ-1134. Moved host splitting and port range validation to HostPort class. HostPort.java: Added valueOf() to parses a "host:port" URL + Added extractPort(), normalizePort(), normalizedHost(), removeExtraChars(). Moved isLocalAddress() code here from StaticUtils. Added normalizedHost field, toNormalizedString() and toString(String) + modified hashCode() and equals() to ensure stability of the results returned by hashCode() and equals(). Added allAddresses() to hide HostPort(int). Moved isEquivalentTo() code here from ReplicationBroker.isSameReplicationServerUrl(). HostPortTest.java: Added. StaticUtils.java: Moved isLocalAddress() and related code to the HostPort class. ReplicationBroker.java: Moved some isSameReplicationServerUrl() to HostPort as isEquivalentTo(). *.java: Used the new HostPort ctor everywhere. It simplified the code in many places and also helped remove duplicated code. ComputeBestServerTest.java: Added ports to serverURLs to ensure tests still pass. *Test.java: Removed the test anti-pattern try/catch/fail. git-svn-id: https://svn.forgerock.org/opendj/trunk@9575 41b1ffd8-f28e-4786-ab96-9950f0a78031
20 Sep, 2013
1 commit
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@9565 41b1ffd8-f28e-4786-ab96-9950f0a78031