05 Jun, 2014

3 commits

  • This is only to use the newly-released tools.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@10783 41b1ffd8-f28e-4786-ab96-9950f0a78031
    mark
     
  • …ces, ignoring matching rules
    
    Introduced a new object, DiffOptions, which can be used to control the behavior of diffEntries:
    
    * the ability to perform byte-by-byte comparisons
    * the ability to select which attributes are compared using an AttributeFilter
    * the ability to control whether reversible (DELETE+ADD) modifications are generated, or non-reversible REPLACE modifications. For small attributes REPLACE modifications are desirable because the consume less bandwidth and result in less replication meta-data.
    
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@10782 41b1ffd8-f28e-4786-ab96-9950f0a78031
    matthew
     
  • Added a test case for the change number computation + fixed the code to support it.
    In ChangeNumberIndexer.run(), fixed a bug where shutdown forces an insert in the Change number index DB.
    
    ChangeNumberIndexerTest.java:
    Added emptyDBTwoDSsOneKilled test.
    Fixed timestamps in a few tests.
    
    ChangeNumberIndexer.java:
    Initialized nextChangeForInsertDBCursor field to avoid NPE on startup.
    Added getOldestLastAliveCSN(), mightMoveForwardMediumConsistencyPoint() + used it in tryNotify().
    Changed canMoveForwardMediumConsistencyPoint() to canMoveForwardMediumConsistencyPoint(CSN).
    Removed mediumConsistency field, unused now.
    In run(), fixed a bug where shutdown forces an insert in the Change number index DB.
    Updated javadocs.
    
    MultiDomainServerState.java, MultiDomainServerStateTest.java:
    Added getOldestCSNExcluding() and isReplicaExcluded().
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@10781 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     

04 Jun, 2014

3 commits

  • git-svn-id: https://svn.forgerock.org/opendj/trunk@10780 41b1ffd8-f28e-4786-ab96-9950f0a78031
    mark
     
  • replication topology with file-based changelog
    OPENDJ-1487 : File based changelog : cursors opened when clearing the log
    
    Log.java :
    * Ensure cursors opened on log are temporarily disabled before rotating
     the head (to avoid renaming the file while reader are opened on it)
    * Allow cursors to be opened on log when performing a clear on the log, 
     turning them into empty cursors. 
       
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@10778 41b1ffd8-f28e-4786-ab96-9950f0a78031
    nicolas.capponi@forgerock.com
     
  • Problem was due to an NPE while deserializing StartECLSessionMsg: ByteArrayScanner.nextString(), can return null, while previous code was always creating an empty string when using the older API.
    
    Thanks Nicolas Capponi for bisecting.
    
    
    StartECLSessionMsg.java:
    In ctor, added a null check to prevent NPE.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@10777 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     

03 Jun, 2014

3 commits


02 Jun, 2014

2 commits


30 May, 2014

1 commit


28 May, 2014

6 commits


27 May, 2014

1 commit


26 May, 2014

2 commits

  • ….append*() methods and getting rid of all method overloading.
    
    
    ByteArrayBuilder.java:
    Renamed all append*() and append*UTF8() methods to non overloaded methods.
    Renamed append(ServerState() to appendServerStateMustComeLast().
    Renamed appendZeroTerminated() to appendZeroTerminatedByteArray()
    
    ByteArrayScanner.java:
    Renamed nextServerState() to nextServerStateMustComeLast(). TODO
    
    *.java:
    Consequence of the changes to ByteArrayBuilder + ByteArrayScanner.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@10762 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • 
    GenerationIdTest.java:
    Implemented checkChangelogSize() by querying "cn=changelog".
    Removed useless generationIdTest() and replaced it by TestNG's method dependencies.
    
    
    First commit from new Grenoble office. Yay!
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@10761 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     

23 May, 2014

7 commits

  • * initial import of data
    * base object searches
    * modify operations, including indexed modifications for employeeNumber.
    
    
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@10760 41b1ffd8-f28e-4786-ab96-9950f0a78031
    matthew
     
  • git-svn-id: https://svn.forgerock.org/opendj/trunk@10759 41b1ffd8-f28e-4786-ab96-9950f0a78031
    mark
     
  • The downside of this change is that now there could be superfluous byte array copies when appending to a ByteArrayBuilder while code before was building the final byte array once after the final size was known.
    If this proves to be a performance hit, it could be optimized later by building the final byte array on the call to ByteArrayBuilder.toByteArray().
    
    Since OpenDJ 2.8 will introduce a protocol version change, it could be a good time to further cleanup the protocol by always encoding ints, longs, CSNs and booleans in their most compact representations. It should also be possible to remove zero terminated madness for anything else than strings.
    
    
    
    ByteArrayBuilder.java, ByteArrayScanner.java:
    Changed existing code to exactly match legacy behaviour.
    Added methods to simplify protocol (de)serialization.
    In ByteArrayBuilder ctor, set the default byte array size to 256 to avoid too copying byte arrays too many times initially.
    
    ByteArrayTest.java:
    Added tests for new functionalities.
    Increased coverage.
    
    
    AckMsg.java:
    In errorsToString(), used List.toString().
    
    MonitorMsg.java:
    In ctor, used setServerState().
    
    ReplicationMsg.java:
    Removed now unused methods getNextLength() and addByteArray().
    
    StartSessionMsg.java:
    Removed ctor only called from tests.
    
    ReplicationServerTest.java:
    Consequence of removing a ctor for StartSessionMsg.
    
    NotAssuredUpdateMsg.java:
    Extracted methods getRealUpdateMsgBytes(), findNthZeroByte(),
    
    
    ServerState.java:
    Moved ctor code to ByteArrayScanner.nextServerState() + removed getNextLength().
    Moved getBytes() code to ByteArrayBuilder.append(ServerState) + removed addByteArray().
    Added method getServerIdToCSNMap().
    
    ServerStateTest.java:
    Consequence of the change to ServerState class.
    
    
    ReplicationData.java: REMOVED, not used anymore
    
    ReplicationDB.java:
    Consequence of removing ReplicationData.
    Removed dead methods getPreviousCSN() and getRegularRecord().
    
    
    *Msg.java:
    Inlined a few methods (getBytes_V1() for example) to make the code clearer.
    
    *.java:
    Removed comments paraphrasing the code.
    Removed now unnecessary exception handling + declarations for UnsupportedEncodingExceptions.
    Added final keywords.
    Reduced visibility of class members.
    Fixed javadocs.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@10757 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • FileChangeNumberIndexDB.java, JEChangeNumberIndexDB.java:
    Renamed DbMonitorProvider.getChangeNumber() to readChangeNumber() + reused getChangeNumber(Record) + used NO_KEY constant.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@10755 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • 
    SynchronizationMsgTest.java:
    In DataProvider methods, inlined + renamed local variables.
    Used assertj.
    Removed empty messages in assertions.
    Aligned assertAttributesEqual() with ProtocolCompatibilityTest's version.
    
    ProtocolCompatibilityTest.java:
    In assertAttributesEqual(), improved the code.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@10754 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • 
    ProtocolCompatibilityTest.java:
    Factorized code by extracting method assertAttributesEqual().
    Used TestCaseUtils.newList().
    Used assertj.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@10753 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • 
    ServerShutdownMonitor.java:
    Factorized code by extracting methods waitAllThreadsDied() and removeDeadThreads().
    Used StaticUtils.sleep(10).
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@10752 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     

22 May, 2014

4 commits


21 May, 2014

1 commit

  • Implemented a log based on multiple log files 
    
    * Add Log class that manage a log as a set of log files:
    ** it contains at least one log file, the head log file, 
         where new records are appended
    ** it contains from zero to multiple read-only log files, 
        issued from rotation of the head log file when it reaches
        a given size
    * Update LogFile class to act as part of a Log.
    * Add purging feature
    * Update other classes from file package with minor changes
    * Add unit tests for new Log class and purging feature
    
    * Update MeteredStream class to use it in changelog
    * Add new interface RotatableLogFile (to be used later by changelog)
    * Update Policy classes to use this new interface
    
    
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@10746 41b1ffd8-f28e-4786-ab96-9950f0a78031
    nicolas.capponi@forgerock.com
     

20 May, 2014

3 commits

  • Used UCDetector and AutoRefactor Eclipse plugins to:
    * reduce visibility of class members,
    * add final keywords to fields,
    * convert comments to javadocs,
    * etc.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@10745 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • Thanks to Chris Ridd for helpful suggestions as well as his review.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@10744 41b1ffd8-f28e-4786-ab96-9950f0a78031
    mark
     
  • …rily leaving the topology
    
    
    Added more tests about how changeNumber computation is performed WRT replicas offline messages and RS restarts.
    
    
    ChangeNumberIndexerTest.java:
    Tested additional scenarios: emptyDBTwoDSsOneInitiallyOffline(), emptyDBTwoDSsOneInitiallyWithChangesThenOffline(), emptyDBTwoDSsOneInitiallyPersistedOfflineThenChanges().
    In several tests, called assertExternalChangelogContent() after calling startCNIndexer().
    Renamed setDBInitialRecords() to setCNIndexDBInitialRecords().
    Added more javadocs.
    Used @Mock + MockitoAnnotations.initMocks() instead of several calls to Mockito.mock().
    
    ChangeNumberIndexer.java:
    Changed the code to support the additional scenarios.
    Renamed allInitialReplicasArePastOldestPossibleCSN() to allInitialReplicasAreOfflineOrAlive().
    Changed removeCursor() into getCursor().
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@10736 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     

18 May, 2014

1 commit


16 May, 2014

1 commit

  • JE was throwing exception when the thread accessing it had been interrupted which happens frequently on single core machines.
    The solution is to replace the use of Thread.sleep(long) + Thread.interrupt() with Object.wait(long) + Object.notify() on thread shutdown.
    
    
    
    JEChangelogDB.java:
    Replaces the use of Thread.sleep(long) + Thread.interrupt() with Object.wait(long) + Object.notify() on thread shutdown.
    Created method jeFriendlySleep(long) to emulate Thread.sleep(long).
    
    ReplicationServer.java:
    Code cleanup.
    Changed shutdown field from boolean to AtomicBoolean.
    Added final keyword to fields.
    Reduced visibility of waitConnections() from public to default.
    In shutdown(), used StaticUtils.close().
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@10733 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     

15 May, 2014

2 commits