10 Oct, 2014
1 commit
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@11111 41b1ffd8-f28e-4786-ab96-9950f0a78031
09 Oct, 2014
1 commit
-
…embers when a search is based on a filter of the isMemberOf attribute. Fixed incorrect test, preventing the method to process all groups properly. The dev 3 branch code is correct. git-svn-id: https://svn.forgerock.org/opendj/trunk@11104 41b1ffd8-f28e-4786-ab96-9950f0a78031
08 Oct, 2014
2 commits
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@11099 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@11098 41b1ffd8-f28e-4786-ab96-9950f0a78031
07 Oct, 2014
2 commits
-
…embers when a search is based on a filter of the isMemberOf attribute. Additional changes to returnGroupMembers() - Removed filter param, since it's part of the SearchOperation. - Changed method to return a boolean to indicate to continue (true) or stop (false) returning entries. - Added javadoc git-svn-id: https://svn.forgerock.org/opendj/trunk@11091 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
…embers when a search is based on a filter of the isMemberOf attribute. git-svn-id: https://svn.forgerock.org/opendj/trunk@11090 41b1ffd8-f28e-4786-ab96-9950f0a78031
06 Oct, 2014
1 commit
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@11084 41b1ffd8-f28e-4786-ab96-9950f0a78031
23 Sep, 2014
1 commit
-
Lock entry ID keys in descending order (children then parents) in order to be consistent with id2subtree updates performed for single entry add and delete operations. git-svn-id: https://svn.forgerock.org/opendj/trunk@11056 41b1ffd8-f28e-4786-ab96-9950f0a78031
22 Sep, 2014
3 commits
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@11035 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@11033 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@11028 41b1ffd8-f28e-4786-ab96-9950f0a78031
18 Sep, 2014
3 commits
-
…he same validations as normal searches Added validation for changes only persistent searches inside ChangelogBackend.registerPersistentSearches(). For cookie based searches, cookie is now stored on the CookieEntrySender object rather than as a search operation attachment. This makes code easier to read and understand. Backend.java In registerPersistentSearch(), now throws DirectoryException. LocalBackendSearchOperation.java: Consequence of the change to Backend.registerPersistentSearch(). ChangelogBackend.java: Added validatePersistentSearch() + called it from registerPersistentSearch(). Added cookie field and setCookie() to CookieEntrySender + removed COOKIE_ATTACHMENT constant + changed code that was using it + no longer pass cookie down method calls Renamed initializeAttachements() to initializeEntrySender() + fixed a bug with the starting phase. git-svn-id: https://svn.forgerock.org/opendj/trunk@11017 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Prevent race condition by proper synchronization in FileChangeLogDB#shutdownDB() method git-svn-id: https://svn.forgerock.org/opendj/trunk@11016 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@11015 41b1ffd8-f28e-4786-ab96-9950f0a78031
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
-
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
-
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
16 Sep, 2014
4 commits
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@11010 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
* Implement a new matching strategy for cursors : LESS_THAN_OR_EQUAL_TO_KEY for both je and file-based implementations * Replace the previous cookie by the usage of an ECLMultiDomainDBCursor generated with the medium consistency CSN as start point and the LESS_THAN_OR_EQUAL_TO_KEY strategy in classes ChangeNumberIndexer and ChangelogBackend * Remove storage of the previous cookie in the log for both je and file-based implementations git-svn-id: https://svn.forgerock.org/opendj/trunk@11009 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
DirectoryServer.java Extracted initializeAuthenticatedUsers(). EncodePassword.java: In initializeServerComponents(), called DirectoryServer.initializeAuthenticatedUsers() to initialize DirectoryServer.authenticatedUsers and avoid the NPE. Extracted method listPasswordStorageSchemes(). Code cleanup. git-svn-id: https://svn.forgerock.org/opendj/trunk@11008 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
in order to fix build after switch back from OpenDJ SDK 3.0.0-SNAPSHOT to 2.6.10-SNAPSHOT git-svn-id: https://svn.forgerock.org/opendj/trunk@11007 41b1ffd8-f28e-4786-ab96-9950f0a78031
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
-
Switched version back to 2.6.10-SNAPSHOT. git-svn-id: https://svn.forgerock.org/opendj/trunk@11002 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
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
-
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
12 Sep, 2014
1 commit
-
In getAttachment(), removeAttachment() and setAttachment(), changed the return type to a generic type. This simplifies client code by removing the need to cast the returned value. git-svn-id: https://svn.forgerock.org/opendj/trunk@10996 41b1ffd8-f28e-4786-ab96-9950f0a78031
08 Sep, 2014
1 commit
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@10995 41b1ffd8-f28e-4786-ab96-9950f0a78031
05 Sep, 2014
1 commit
-
* Remove TODOs and method skeletons that won't be implemented The corresponding cases should be covered by functional tests git-svn-id: https://svn.forgerock.org/opendj/trunk@10993 41b1ffd8-f28e-4786-ab96-9950f0a78031
04 Sep, 2014
4 commits
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@10992 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@10991 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
…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
-
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
03 Sep, 2014
3 commits
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@10988 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
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
-
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
02 Sep, 2014
2 commits
-
to support cn=changelog Ignore unused domains when validating a server state for a changelog search. This was the prior behavior withe ECL* implementation. * ReplicationServer.java: Update validateServerState() method to ignore unused domain git-svn-id: https://svn.forgerock.org/opendj/trunk@10985 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@10984 41b1ffd8-f28e-4786-ab96-9950f0a78031
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
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
-
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