05 Sep, 2013
5 commits
-
…th a dot, unlike Javadoc) git-svn-id: https://svn.forgerock.org/opendj/trunk@9512 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Fixed a few bugs (introduced in the previous commits?): - All code must check that the result of calling ChangeNumberIndexDB.getFirstCNIndexData() and ChangeNumberIndexDB.getLastCNIndexData() are not null (if the DB is empty, or closed, etc.). - In ReplicationServer.clearGenerationId(), the code could have a side effect if the last entry in the DB was cleared by this method: the lastGeneratedChangeNumber would be allowed to go back! ChangeNumberIndexDB.java: Removed getLastChangeNumber(). DraftCNDbHandler.java: Inlined getLastChangeNumber() to the only remaining method caller ReplicationServer.getChangeNumberIndexDB(). Finally changed the implementation of isEmpty() to something less costly. DraftCNDbHandlerTest.java: Inlined getFirstChangeNumber() and getLastChangeNumber(). ReplicationServer.java: In clearGenerationId(), removed the code changing the value of lastGeneratedChangeNumber: lastGeneratedChangeNumber is not allowed to go backward. In getChangeNumberIndexDB(), inlined here the code of DraftCNDbHandler.getLastChangeNumber() + removed useless use of MessageBuilder. In getECLChangeNumberLimits(), added a null check for the result of getLastCNIndexData(). replication.properties: Added a new error message. Changed MILD_ERR_DRAFT_CHANGENUMBER_DATABASE_173 to MILD_ERR_CHANGENUMBER_DATABASE_173. ECLServerHandler.java: In findCookie(), replaced the DB empty checks by null checks on the return of getFirstCNIndexData() and getLastCNIndexData() since this is purely equivalent. git-svn-id: https://svn.forgerock.org/opendj/trunk@9511 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@9510 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Remainder of r9504: changed changeNumber from int to long. git-svn-id: https://svn.forgerock.org/opendj/trunk@9509 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Added CNIndexData class to replace the conjunct use of the (CSN, baseDN, previousCookie) tuple along with the changeNumber. It allowed to replace: - several parameters list with all theses types - several groups of methods returning instances of these types with duplicate code in the implementation. Remainder of r9504: changed changeNumber from int to long. CNIndexData.java: ADDED *.java: Consequence of introducing CNIndexData class. ECLServerHandler.java: Renamed releaseIterator() into releaseCursor(). In getNextECLUpdate(), aggregated consecutive if statements + added a debugInfo(). Renamed assignNewDraftCNAndStore() to assignNewChangeNumberAndStore(). Changed changeNumber from int to long. ChangeNumberIndexDB.java: Replaced getCSN(), getBaseDN() and getPreviousCookie() by getCNIndexData(). Renamed getFirstChangeNumber() to getFirstCNIndexData(). Added getLastCNIndexData(). Changed add() signature. DraftCNDbHandler.java Consequence of the change to implemented interface ChangeNumberIndexDB. Changed changeNumber from int to long. Added getChangeNumber(). ChangeNumberIndexDBCursor.java: Replaced getCSN(), getBaseDN() and getPreviousCookie() by getCNIndexData(). DraftCNDbIterator.java Consequence of the change to implemented interface ChangeNumberIndexDBCursor. DraftCNData.java: Added changeNumber field + getter. Replaced fields value, baseDN and csn by cnIndexData + getters. Renamed readFirstChangeNumber() and readLastChangeNumber() to readFirstCNIndexData() and readLastCNIndexData(). Added newCNIndexData(). In inner class DraftCNDBCursor, Field key is now a ReplicationDraftCNKey (was DatabaseEntry) + DraftCNData field has been replaced with CNIndexData + entry is initialized on construction. Replaced currentValue(), currentBaseDN(), currentCSN() and currentKey() by currentData(). Removed getKey(). ReplicationDraftCNKey.java: Added a default ctor. In getChangeNumber(), matched the code in DraftCNDB. DraftCNDbHandlerTest.java: Added assertEqualTo(), getFirstChangeNumber(), getLastChangeNumber(), getPreviousCookie(). git-svn-id: https://svn.forgerock.org/opendj/trunk@9508 41b1ffd8-f28e-4786-ab96-9950f0a78031
04 Sep, 2013
11 commits
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@9507 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Change one field from Long to long. SearchOperationBasis*.java: Extracted method getSizeLimit() and getTimeLimit(). ExternalChangeLogTest.java: Simplified the code. git-svn-id: https://svn.forgerock.org/opendj/trunk@9506 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
ChangeNumberIndexDB.java: All methods can now throw ChangelogException. ReplicationServer.java: Extracted method shutdownCNIndexDB(). Removed getFirstChangeNumber() and getLastChangeNumber(). DraftCNDbHandler.java: Removed catch blocks and let the exception propagate. ECLServerHandler.java: Let the ChangelogException propagate. ReplicaDBCursor.java: Augmented the javadoc to explain the sort order. Follow up of r9504. git-svn-id: https://svn.forgerock.org/opendj/trunk@9505 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
After talking Matthew's over the phone review, did a few changes described down below. *.java: Changed changeNumber from int to long throughout the replication code base. ECLUpdateMsg.java: In getBytes(), did not complete the change to long because it would require a protocol version change. ReplicaDBCursor.java: Now extends Comparable. ReplicaDBCursorComparator.java: REMOVED Code has been moved to JEReplicaDBCursor.compareTo(). ChangeNumberIndexDB.java: Does not extend Runnable anymore (mistake from earlier refactorings). DraftCNDbHandler.java: Now extends Runnable. git-svn-id: https://svn.forgerock.org/opendj/trunk@9504 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
* all impacted tests pass. git-svn-id: https://svn.forgerock.org/opendj/trunk@9503 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@9502 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
- "draft change number" to "change number" - "draftCN" to "change number" - "sn" to "cn" in tests. Fixed wrong usage of seqnum (only defined for CSNs - see the various IETF draft) Now remains to rename a few classes. git-svn-id: https://svn.forgerock.org/opendj/trunk@9501 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
In flushFractionalConfigIntoEntry(), changed code to fix build break from r9497. In doLDIFImport(), extracted method getAttribute() + used early exit . Used javadocs instead of comments. Removed redundant comments. Used static imports. git-svn-id: https://svn.forgerock.org/opendj/trunk@9500 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Fixed a small bug that I introduced in the previous commit by removing ENTRYUUID from the Set of attributes. Also, apparently "*" encodes for user attributes (and not operational). ExternalChangeLogTest.java: In ALL_ATTRIBUTES, changed the order of the attributes to match the order mentioned in the javadoc. git-svn-id: https://svn.forgerock.org/opendj/trunk@9499 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
- ChangelogDB to ChangeNumberIndexDB - ChangelogDBIterator to ChangeNumberIndexDBCursor git-svn-id: https://svn.forgerock.org/opendj/trunk@9498 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
In loadGenerationId(), fixed a bug. Removed allOperationalAttributes() and replaced it with ALL_OPERATIONAL_ATTRS constant. Cannot remove HISTORICAL_ATTRIBUTE_NAME from it otherwise HistoricalTest and ExternalChangeLogTest start to fail. Used Sets instead of Lists to avoid duplicate entries and the code does not care about ordering. git-svn-id: https://svn.forgerock.org/opendj/trunk@9497 41b1ffd8-f28e-4786-ab96-9950f0a78031
03 Sep, 2013
5 commits
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@9496 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@9495 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Reverted if statement conditions to do early exit in loops or methods. Reduced variable scopes. Moved clearJEBackend() to TestCaseUtils and renamed it clearJEBackend2(). Extracted method allOperationalAttributes. Increased vertical density. ReplicationServerDomain.java: Fixed javadocs. *Test*.java: Used TestCaseUtils.clearJEBackend2(). Various refactorings. git-svn-id: https://svn.forgerock.org/opendj/trunk@9494 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@9493 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
…ading from 2.5.0-Xpress git-svn-id: https://svn.forgerock.org/opendj/trunk@9492 41b1ffd8-f28e-4786-ab96-9950f0a78031
02 Sep, 2013
5 commits
-
After renaming ChangeNumber to CSN, fixed more javadocs, variable names, method names, etc. git-svn-id: https://svn.forgerock.org/opendj/trunk@9491 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
No idea why it was working then suddenly not working anymore though. ExternalChangeLogTest.java Extracted methods remove(), createSearchRequest(). In removeTestBackend(), used variadic arguments. git-svn-id: https://svn.forgerock.org/opendj/trunk@9490 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@9489 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
+ minor code cleanup git-svn-id: https://svn.forgerock.org/opendj/trunk@9488 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
- ChangeNumber to CSN - ChangeNumberGenerator to CSNGenerator - ChangeNumberTest to CSNTest - ChangeNumberGeneratorTest to CSNGeneratorTest git-svn-id: https://svn.forgerock.org/opendj/trunk@9487 41b1ffd8-f28e-4786-ab96-9950f0a78031
30 Aug, 2013
7 commits
-
* add support for specifying the LoadBalancerEventListener when constructing load-balancing algorithms. git-svn-id: https://svn.forgerock.org/opendj/trunk@9483 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Renamed: - ReplicationDBCursor to ReplicaDBCursor - ReplicationDBCursorComparator to ReplicaDBCursorComparator - JEReplicationDBCursor to JEReplicaDBCursor Fixed javadocs, variable names, method names, etc. git-svn-id: https://svn.forgerock.org/opendj/trunk@9482 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@9481 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Fixed checkstyle. Oh Eclipse, why did you fail me? git-svn-id: https://svn.forgerock.org/opendj/trunk@9480 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@9479 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Renamed: - ReplicationIterator to ReplicationDBCursor - ReplicationIteratorComparator to ReplicationDBCursorComparator - JEReplicationIterator to JEReplicationDBCursor Fixed javadocs, variable names, method names, etc. ReplicationServerDomain.java: Renamed getChangelogIterator() to getCursorFrom(). DbHandler.java: Renamed generateIterator() to generateCursorFrom(). MessageHandler.java: Extracted nextOldestUpdateMsg() and findOldestChangeNumberFromReplicationDBs() to increase code expressiveness. git-svn-id: https://svn.forgerock.org/opendj/trunk@9478 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Added compareToEquivalentToEquals(), hashCodesEqualWhenChangeNumbersEqual(), hashCodesEqualWhenCompareToEqual() to verify basic properties are covered. Code cleanup. git-svn-id: https://svn.forgerock.org/opendj/trunk@9477 41b1ffd8-f28e-4786-ab96-9950f0a78031
29 Aug, 2013
7 commits
-
* avoid accidentally trapping Errors - only RuntimeExceptions should be caught. Thanks to Peter for pointing this out :-) git-svn-id: https://svn.forgerock.org/opendj/trunk@9476 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
* implement event notification framework * TODO: need to figure out how to expose it in public API. git-svn-id: https://svn.forgerock.org/opendj/trunk@9475 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
* save last failure and include it as exception cause when all factories have failed. git-svn-id: https://svn.forgerock.org/opendj/trunk@9474 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
* make ConnectionEntryReader non-final. git-svn-id: https://svn.forgerock.org/opendj/trunk@9472 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@9471 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
ReplicationServerDomain.java: Renamed getMessage() to debug() + called TRACER.debugInfo() in it. MessageHandler.java: Implemented toString(). git-svn-id: https://svn.forgerock.org/opendj/trunk@9470 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Renamed: - field stateDb to changelogStateDb. - start() to initializeFromChangelogStateDB(). - putInStateDBIfNotExist() to putInChangelogStateDBIfNotExist() - deleteFromStateDB() to deleteFromChangelogStateDB() + changed the signature. In getOrAddDb(), reduced code clutter and removed useless comments. Extracted methods kb(), mb(), toBytes(), buildGenIdKey(), buildServerIdKey(), buildGenIdData() for better readability. Extracted method debug() to reduce code clutter. Used static imports. ReplicationServer.java: Consequence of the rename of ReplicationDbEnv.start(). git-svn-id: https://svn.forgerock.org/opendj/trunk@9469 41b1ffd8-f28e-4786-ab96-9950f0a78031