10 Oct, 2014

1 commit


09 Oct, 2014

1 commit


08 Oct, 2014

2 commits


07 Oct, 2014

2 commits


06 Oct, 2014

1 commit


23 Sep, 2014

1 commit


22 Sep, 2014

3 commits


18 Sep, 2014

3 commits


17 Sep, 2014

3 commits

  • JEChangeNumberIndexDBTest.java:
    Also removed unused field previousCookie.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@11014 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • Code was broken by the fix for OPENDJ-1541 Persistent search on cn=changelog can return duplicates.
    This change introduced a search phase enum and initialized all searches to the "initial search" phase.
    Current fix consist in directly initializing persistent searches with changesOnly=true to the "persistent search" phase.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@11013 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • There is a mismatch between code before and after r10757.
    This is affecting 2.6.x and 2.6.next OpenDJ servers communicating with each other.
    Before r10757, serialized ModifyMsg included a zero separator after byte arrays, after r10757 it did not.
    This change is introducing back the zero separator.
    
    ModifyMsg.java:
    In getBytes_V45(), appended the zero byte separator after byte arrays + adapted decodeBody_V4() code for it.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@11011 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     

16 Sep, 2014

4 commits


15 Sep, 2014

4 commits

  • …he defaults used when creating new backends.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@11003 41b1ffd8-f28e-4786-ab96-9950f0a78031
    ludo
     
  • Switched version back to 2.6.10-SNAPSHOT.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@11002 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • Persistent searches are registered before initial search ends (which is correct).
    Because a new change can be added to the changelog before the "initial search" phase is over, the "persistent search" phase can return this change before the "initial search" phase returns it later.
    
    To avoid this problem, persistent searches is marked with an enum to mention which phase is being run. The phases are the following:
    1. INITIAL: The "initial search" phase is running, the "persistent search" phase do not return any entry.
    2. TRANSITIONING: The "initial search" phase has completed and blocks currently running "persistent search" phase while the former is verifying no new updates where persisted to the DB
    3. PERSISTENT: The "initial search" phase is finished and completed the transition to the "persistent search" phase. The "persistent search" phase can return all entries.
    For the change-number-based persistent searches, only the last changeNumber sent by the "initial search" phase is recorded. For cookie-based persistent searches, for each replica, the last CSN sent by the "initial search" phase is recorded.
    
    Problem is that the transitioning phase has the potential to block the whole server if the client of the persistent search does not consume changes fast enough.
    This will be addressed separately.
    
    
    ChangelogBackend.java:
    Added constants COOKIE_ATTACHMENT and ENTRY_SENDER_ATTACHMENT.
    Added cookieBasedPersistentSearches and changeNumberBasedPersistentSearches fields.
    Added SearchPhase enum.
    Added CookieEntrySender, ChangeNumberEntrySender and SendEntryData static inner classes + made several methods static to call them from these classes.
    In initialSearchFromCookie(), initialSearchFromChangeNumber(), notifyEntryAdded() and registerPersistentSearch(), set or retrieved attachments + used entrySender.
    Extracted methods sendCookieEntriesFromCursor(), sendChangeNumberEntriesFromCursors().
    Added initializeAttachements().
    Split notifyEntryAdded() in two: notifyCookieEntryAdded() and notifyChangeNumberEntryAdded().
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@11000 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • Persistent searches are registered before initial search ends (which is correct).
    Because a new change can be added to the changelog before the "initial search" phase is over, the "persistent search" phase can return this change before the "initial search" phase returns it later.
    
    To avoid this problem, persistent searches is marked with an enum to mention which phase is being run. The phases are the following:
    1. INITIAL: The "initial search" phase is running, the "persistent search" phase do not return any entry.
    2. TRANSITIONING: The "initial search" phase has completed and blocks currently running "persistent search" phase while the former is verifying no new updates where persisted to the DB
    3. PERSISTENT: The "initial search" phase is finished and completed the transition to the "persistent search" phase. The "persistent search" phase can return all entries.
    For the change-number-based persistent searches, only the last changeNumber sent by the "initial search" phase is recorded. For cookie-based persistent searches, for each replica, the last CSN sent by the "initial search" phase is recorded.
    
    Problem is that the transitioning phase has the potential to block the whole server if the client of the persistent search does not consume changes fast enough.
    This will be addressed separately.
    
    
    ChangelogBackend.java:
    Added constants COOKIE_ATTACHMENT and ENTRY_SENDER_ATTACHMENT.
    Added cookieBasedPersistentSearches and changeNumberBasedPersistentSearches fields.
    Added SearchPhase enum.
    Added CookieEntrySender, ChangeNumberEntrySender and SendEntryData static inner classes + made several methods static to call them from these classes.
    In initialSearchFromCookie(), initialSearchFromChangeNumber(), notifyEntryAdded() and registerPersistentSearch(), set or retrieved attachments + used entrySender.
    Extracted methods sendCookieEntriesFromCursor(), sendChangeNumberEntriesFromCursors().
    Added initializeAttachements().
    Split notifyEntryAdded() in two: notifyCookieEntryAdded() and notifyChangeNumberEntryAdded().
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@10999 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     

12 Sep, 2014

1 commit


08 Sep, 2014

1 commit


05 Sep, 2014

1 commit


04 Sep, 2014

4 commits

  • git-svn-id: https://svn.forgerock.org/opendj/trunk@10992 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • git-svn-id: https://svn.forgerock.org/opendj/trunk@10991 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • …should not return the base changelog entry
    
    I did the following changes:
    
    - Persistent searches on cn=changelog with changesOnly=true no longer return the base changelog entry
    - Fixed a functional bug with setting hasSubordinates on the base changelog entry:
    -- hasSubordinates must be computed regardless of the search parameters, result can also be cached in memory once and for all
    - As a consequence, it means we can immediately return the base changelog entry for initial searches without even looking for any subordinate changelog entries.
    - Fixed a race condition when registering persistent searches: first set the cookie in the attachments then register the persistent searches
    - implementing numSubordinates() was not required and it might be buggy, so returned -1 instead.
    
    
    ChangelogBackend.java:
    In notifyEntryAdded() (a.k.a. persistent search phase), never return the base changelog entry.
    Removed EntrySender and moved all its methods back into ChangelogBackend + stored the MultiDomainServerState cookie as an attachment of the SearchOperation.
    Renamed search*() to internalSearch*().
    In hasSubordinates(), reimplemented it in a more efficient way + added baseChangelogHasSubordinates() and baseEntryHasSubordinates field to memoize its result.
    In numSubordinates(), is not required, so just returned -1 + removed NumSubordinatesSearchOperation.
    In registerPersistentSearch(), register the persistent searches after setting the cookie attachment on the search operation
    Completed javadocs.
    
    In registerPersistentSearch(), forced changesOnly=true persistent searches to never return the changelog base entry.
    Renamed Entry.hasReturnedBaseEntry field to mustReturnBaseEntry to fit the fact the changelog base entry might never be returned + inverted all the boolean expressions related to this field.
    
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@10990 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • to support cn=changelog
    CR-4439
    
    Implementation of an additional validation of provided cookie when searching changelog
    in cookie mode. 
    
    Check for each state of the provided cookie that the csn is not older than the oldest CSN
    available in each domain. If this is not the case, then an error 
    ERR_RESYNC_REQUIRED_TOO_OLD_DOMAIN_IN_PROVIDED_COOKIE is returned. 
    
    This check was done previously in the ECLServerHandler class but was not ported when
    writing ChangelogBackend.  It also means I'm re-adding some methods deleted by the 
    previous big clean done by Jean-Noel. 
    
    Changes:
    * ReplicationServer.java : 
      - add the check to validateServerState() method
      - refactor validateServerState() method for better readability
    * ReplicationServerDomain.java : 
      - re-add getOldestState() method
    * ReplicationDomainDB. java : 
      - re-add getDomainOldestCSNs(DN) method
    * FileChangelogDB.java, JEChangelogDB.java : 
      - re-add implementation of getDomainOldestCSNs(DN) method
    
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@10989 41b1ffd8-f28e-4786-ab96-9950f0a78031
    nicolas.capponi@forgerock.com
     

03 Sep, 2014

3 commits

  • git-svn-id: https://svn.forgerock.org/opendj/trunk@10988 41b1ffd8-f28e-4786-ab96-9950f0a78031
    mark
     
  • to support cn=changelog
    
    Add new test with use of include attributes when searching changelog 
    
    * ChangelogBackendTestCase.java: 
     - implement searchInCookieModeuseOfIncludeAttributes() test
     - minor refactoring
    
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@10987 41b1ffd8-f28e-4786-ab96-9950f0a78031
    nicolas.capponi@forgerock.com
     
  • After OPENDJ-1206, I could remove all old External ChangeLog (or ECL for short) related classes. I could also remove annoyingly strange APIs from various places of replication code.
    
    
    
    ECLUpdateMsg.java, ServerStartECLMsg.java, StartECLSessionMsg.java, ECLServerHandler.java, ECLServerWriter.java, ECLSearchOperation.java, ECLWorkflowElement.java, ExternalChangeLogTest.java: REMOVED
    Also removed package src/server/org/opends/server/workflowelement/externalchangelog as part of these deletes.
    
    replication*.properties:
    Removed now unused SEVERE_ERR_RESYNC_REQUIRED_TOO_OLD_DOMAIN_IN_PROVIDED_COOKIE.
    
    ReplicationMsg.java:
    Deprecated old ECL message types.
    
    ReplicationBroker.java, ReplicationServer.java:
    Removed all ECL related code.
    
    ReplicationServerDomain.java:
    Removed the now unused otherHandlers field, stopServer(MessageHandler), registerHandler(MessageHandler), unRegisterHandler(MessageHandler), unregisterOtherHandler(), getOldestState() and getLatestDomainTrimDate()
    
    ServerHandler.java
    Reduced visibility has much as possible after removing ECLServerHandler.
    
    
    
    MultimasterReplication.java:
    Renamed getECLDisabledDomains() to , included "cn=changelog" by default + changed client code to not add it anymore.
    
    LastCookieVirtualProvider.java:
    Consequence of the change to MultimasterReplication.
    
    ChangelogBackend.java:
    Consequence of the change to MultimasterReplication.getECLDisabledDomains().
    Removed SearchParams.requestType and replaced its usage with the new isCookieBasedSearch()
    
    
    
    MultiDomainServerState.java, ServerState.java, ReplicationDomainDB.java, FileChangelogDB.java, JEChangelogDB.java:
    Removed now unused methods / fields.
    Made private methods / fields that are now only used inside their declaration classes.
    
    
    
    ChangelogBackendTestCase.java, SynchronizationMsgTest.java, FileReplicaDBTest.java:
    Updated or removed tests as a consequences of the whole change.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@10986 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     

02 Sep, 2014

2 commits


01 Sep, 2014

1 commit

  • Moved persistent searches from workflow elements to the backends.
    Made persistent searches work for the ChangelogBackend.
    Ensured the base changelog entry is always returned before any changelog entry, even with persistent searches. For this, used SearchOperation attachments to pass information from the "initial search" phase to the "persistent search" phase.
    Added ChangelogBackend.notifyEntryAdded() and called it directly from the (JE|File)ChangelogDB and the ChangeNumberIndexer.
    
    FIXME: prevent concurrent execution of initial vs. persistent search phases to avoid sending duplicates.
    How do other backends deal with such issue? Apparently they don not deal with it.
    TODO: verify changelog read privilege for persistent searches
    
    
    
    
    Backend.java
    Added persistentSearches field + registerPersistentSearch() and getPersistentSearches().
    
    ChangelogBackend.java:
    Replaced baseChangelogDN with CHANGELOG_BASE_DN and used it throughout + simplified ctor.
    Added notifyEntryAdded(), getPersistentSearches(), isPersistentSearch(), isCookieBased(), getNewestCookie(), getChangelogDB(), getInstance(), NumSubordinatesSearchOperation.setAttachment(), TODO JNR
    Overrode Backend.registerPersistentSearch().
    Extracted method getExcludedDomains().
    Renamed SearchParams.multiDomainServerState to cookie.
    Removed unused SearchParams.operationId.
    Added inner class EntrySender and moved methods to it: matchBaseAndScopeAndFilter(), sendBaseChangelogEntry(), buildBaseChangelogEntry(),
    In searchFromCookie(), searchFromChangeNumber() and sendEntryForUpdateMessage(), simplified the code by using EntrySender.
    Implemented finalizeBackend().
    
    *Backend.java:
    Called super.finalizeBackend()
    
    ChangelogBackendTestCase.java:
    Enabled as many tests as possible.
    
    
    
    PersistentSearch.java
    Added changesOnly field + isChangesOnly() + modified ctor to set it.
    
    ReplicationServer.java:
    Replaced old code enabling External Changelog (via workflow element) with new code (with ChangelogBackend).
    
    
    
    FileChangelogDB.java, ChangeNumberIndexer.java, JEChangelogDB.java:
    Called new ChangelogBackend.notifyEntryAdded().
    
    ChangeNumberIndexerTest.java
    Consequence of the change to ChangeNumberIndexer.
    
    
    
    LDAPReplicationDomain.java:
    Removed old code enabling External Changelog.
    Code cleanup.
    
    ExternalChangeLogTest.java:
    Disabled tests that do not pass anymore.
    Removed old code enabling External Changelog.
    Code cleanup.
    
    
    
    ECLWorkflowElement.java, LocalBackendWorkflowElement.java:
    Removed persistentSearches field + registerPersistentSearch() and getPersistentSearches().
    
    LocalBackendAddOperation.java, LocalBackendDeleteOperation.java, LocalBackendModifyDNOperation.java:
    Consequence of moving persistent searches from workflow elements to the backends.
    
    LocalBackendModifyOperation.java:
    Consequence of moving persistent searches from workflow elements to the backends.
    In performAdditionalPasswordChangedProcessing(), simplified code because we are adding to a Set.
    Code cleanup.
    
    LocalBackendSearchOperation.java:
    Consequence of moving persistent searches from workflow elements to the backends.
    Transformed processSearch field into a local variable.
    Code cleanup.
    
    ECLServerHandler.java, ECLServerWriter.java, ECLSearchOperation.java:
    Adapted the code to use ChangelogBackend.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@10982 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     

29 Aug, 2014

2 commits

  • to support cn=changelog
    
    * Implement checking of CHANGELOG_READ Privilege
    * Implement 2 more tests for changelog backend. 
       Tests are still disabled (until changelog backend is activated in code).
    
    * ChangelogBackend.java: 
     - add new method checkChangelogReadPrivilege() to check CHANGELOG_READ
      privilege
     
    * ChangelogBackendTestCase.java: 
     - implement searchInCookieModeAfterDomainIsRemoved test
     - implement searchInCookieModeOnTwoSuffixesWithPrivateBackend test
    
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@10979 41b1ffd8-f28e-4786-ab96-9950f0a78031
    nicolas.capponi@forgerock.com
     
  • 
    SearchOperation.java, SearchOperationBasis.java, SearchOperationWrapper.java:
    Changed entriesSent and referencesSent from int to AtomicInteger.
    Removed unused fields eclRequestControl, processingStartTime and processingStopTime.
    Simplified constructors by initializing the fields during where they are declared.
    Extracted method getACIHandler().
    Removed incrementEntriesSent() and incrementReferencesSent().
    Code cleanup.
    
    Backend.java:
    Removed unused code.
    Removed ctor, initialized fields where they are declared.
    
    WorkflowTopology.java:
    Added toString().
    Code cleanup.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@10978 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac