05 Oct, 2013
1 commit
-
Fixed problem introduced in tests at r9648. HeartBeatMsg.java: Added toString(). git-svn-id: https://svn.forgerock.org/opendj/trunk@9666 41b1ffd8-f28e-4786-ab96-9950f0a78031
04 Oct, 2013
10 commits
-
… it helps with CI that runs on single CPU machine. git-svn-id: https://svn.forgerock.org/opendj/trunk@9665 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Note that these tests may still fail some time to time, since they expect the JMX connection handler to start in less than 1 second, which might be low on a single cpu VM. git-svn-id: https://svn.forgerock.org/opendj/trunk@9664 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
* 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
-
Over the shoulder review by Nicolas Capponi Removed unnecessary if guards before calling logging: rely on SLF4J to lazily call toString() when needed. git-svn-id: https://svn.forgerock.org/opendj/trunk@9656 41b1ffd8-f28e-4786-ab96-9950f0a78031
03 Oct, 2013
9 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
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@9654 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
* add slf4j-jdk14 compile dependency for the examples, toolkit, and rest2ldap servlet * add slf4j-jdk14 test dependency for all sub-modules. git-svn-id: https://svn.forgerock.org/opendj/trunk@9653 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
* reduce log level of heartbeat failure message. git-svn-id: https://svn.forgerock.org/opendj/trunk@9651 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
…fore proceeding. Adding a wait should solve the problem. ReplicationTestCase.java Added executeTask(). Used simpler InternalConnection.process*() APIs. HistoricalTest.java: Used ReplicationTestCase.executeTask(). Inlined local variables. Extracted method getEntryValue(). Changed signature of publishModify(). GenerationIdTest.java: Used ReplicationTestCase.executeTask(). Renamed assertNoMessageReceivedBadGenId() to assertNoMessageReceived(). ReplicationServerTest.java Used ReplicationTestCase.executeTask(). TestCaseUtils.java: Used simpler InternalConnection.process*() APIs. UpgradeTestCase.java Renamed isOutputContainsExpectedMessage() to assertContainsMessage(). *Test.java: Used assertj. Let the exceptions go up. git-svn-id: https://svn.forgerock.org/opendj/trunk@9650 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@9649 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Change entryList and configEntryList from LinkedList to Set and renamed them to entriesToCleanup and configEntriesToCleanup. Extracted method connect() and waitForSpecificMsg() + Changed the return type of the existing waitForSpecificMsg() methods. In configureReplication(), added 2 String parameters + extracted method addSynchroServerEntry() and addConfigEntry(). Simplified code a lot. *Test[Case].java: Consequence of the changes to ReplicationTestCase. Factorized code with ReplicationTestCase. Various cleanups: - used assertj - used StaticUtils.close() - made fields private - used foreach - used assertEquals() instead of assertTrue() - removed try/catch/fail test anti pattern. - let exceptions go up the stack ProtocolWindowTest.java: Extracted method searchNbMonitorEntries(). git-svn-id: https://svn.forgerock.org/opendj/trunk@9648 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
-
In ExternalChangeLogTest.ECLReplicationServerFullTest(), debugging somewhat allows to reproduce the problem. The sequence of events is... interesting. In ECLAfterChangelogTrim(), the last published DeleteMsg might not even have even been received on the other side when the test ends (i.e. ServerReader.run() might never have called/completed calling Session.receive()), hence clearing the changelogDB cannot clear this yet to be received message! Looking closely at this test, I cannot see any reason to publish this DeleteMsg, so I removed this code. I also took the opportunity to get rid of what look like a useless 1s sleep. ExternalChangeLogTest.java: In ECLReplicationServerFullTest(), removed sending a useless DeleteMsg that changes nothing to the test result + removed a useless 1s sleep (Yay!) + removed the call to clearChangelogDB() in the finally block (already called by a @AfterTest) git-svn-id: https://svn.forgerock.org/opendj/trunk@9646 41b1ffd8-f28e-4786-ab96-9950f0a78031
02 Oct, 2013
7 commits
-
In ExternalChangeLogTest.ECLReplicationServerFullTest(), it looks like the server does not have the time to trim the last "changetype: delete" from the previous tests method, so let's force the test to clear the changelogDB before it finishes. ExternalChangeLogTest.java: In ECLReplicationServerFullTest(), called clearChangelogDB() in the finally block to force cleaning test data. git-svn-id: https://svn.forgerock.org/opendj/trunk@9645 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Review CR-2404 SDK now only depends on SLF4J API for logging (slf4j-api-1.7.5.jar). End-users of the SDK are now able to choose the actual logging framework to use by adding an additional dependency. For tests only (test scope in maven), there is a also a dependency on java.util.logging (known as jdk14 by SLF4J), in order to change the defaut log level for some test cases. There are now multiples loggers, defined centrally in StaticUtils class : DEFAULT, CONTROLS, SCHEMA and IO. It gives a central point for the list of available loggers. This is a compromise between having a single logger for all messages and one logger per class which can be a hassle to setup. The majority of "if (logger.isEnabledForXXX)" checks before logging have been removed as it is the preferred way for SLF4J. They are kept only in some cases where arguments of the logged message involve some computation. All logs at error, warn and info level should be internationalised, but it will be done in a separate phase (added "TODO: I18N" comments to find them). git-svn-id: https://svn.forgerock.org/opendj/trunk@9644 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
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
8 commits
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@9638 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
* change json-resource-servlet dependency scope to "compile" for better dependency resolution when building HTTP connection handler in OpenDJ * unfortunately this means that we need "include" filters when building the WAR. git-svn-id: https://svn.forgerock.org/opendj/trunk@9637 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
In setUp(), used "ou" under "o" to be logically compliant with LDAP. In assertDeleteMsgBodyEquals(), renamed parameters to match the names in sendAndReceiveDeleteMsg() + removed a useless cast. git-svn-id: https://svn.forgerock.org/opendj/trunk@9634 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
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
-
- added unit tests for attribute conversions. - fixed wrong invalid conversion. Thanks to Matt && Jean-Noel again :) git-svn-id: https://svn.forgerock.org/opendj/trunk@9630 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
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@9625 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
-
* use a Maven WAR overlay to pull in CREST Servlet and Glassfish config files. git-svn-id: https://svn.forgerock.org/opendj/trunk@9623 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Review CR-2386 Change is limited to MemoryBackend class : * added size limit support in handleSearch() method, throwing error with ResultCode.SIZE_LIMIT_EXCEEDED if limit is exceeded * refactored handleSearch to avoid duplicate code for SearchScope.SINGLE_LEVEL and SearchScope.WHOLE_SUBTREE, adding new private method searchWithSubordinates() Updated test class MemoryBackendTestCase * added tests for size limit for both SearchScope.SINGLE_LEVEL and SearchScope.WHOLE_SUBTREE * added test to ensure that we can get all entries from the memory backend. git-svn-id: https://svn.forgerock.org/opendj/trunk@9622 41b1ffd8-f28e-4786-ab96-9950f0a78031