08 Sep, 2014
1 commit
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@10995 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
1 commit
-
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
1 commit
-
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
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
27 Aug, 2014
1 commit
-
Preparation work: ChangeNotificationListener interface only cover a subset of its DirectoryServerPlugin superclass capabilities, so it is redundant. So I removed ChangeNotificationListener to ease moving persistent searches to the backend. The two ChangeNotificationListener implementations are now subclasses of InternalDirectoryServerPlugin. Updated all code after removing ChangeNotificationListener. ChangeNotificationListener.java: REMOVED AuthenticatedUsers.java: Now extends InternalDirectoryServerPlugin instead of implementing ChangeNotificationListener. Extracted method getNewAuthNDN() + toDN(). CryptoManagerSync.java: Now extends InternalDirectoryServerPlugin instead of implementing ChangeNotificationListener. Extracted method getNewAuthNDN() + toDN(). DirectoryServer.java: Removed references to removed type ChangeNotificationListener. Be careful with when AuthenticatedUsers is initialized. DirectoryConfig.java, LocalBackend*Operation.java: Removed references to removed type ChangeNotificationListener. CollectionUtils.java: ADDED TestChangeNotificationListener.java: Now extends InternalDirectoryServerPlugin instead of implementing ChangeNotificationListener. AddOperationTestCase.java: Extracted methods newRawAttributes(), byteStrings(), addSuccess(), addDisconnect(), bind(), writeAddRequest() + used CollectionUtils. Consequence of the changes to TestChangeNotificationListener. DeleteOperationTestCase.java: Consequence of the changes to TestChangeNotificationListener. ModifyOperationTestCase.java: Extracted methods newModifications(), newRawModifications() + used CollectionUtils. Consequence of the changes to TestChangeNotificationListener. git-svn-id: https://svn.forgerock.org/opendj/trunk@10976 41b1ffd8-f28e-4786-ab96-9950f0a78031
26 Aug, 2014
2 commits
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@10974 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
These methods are useless because setChangeNumber() is never set inside production code, so changeNumber is always equal to -1 for all the update operations. In addition it is very unlikely the ChangeNumberIndexer could have computed the changeNumber before a results are sent to a persistent search. AddOperation*.java, DeleteOperation*.java, ModifyDNOperation*.java, ModifyOperation*.java: Removed changeNumber fields + getters and setters. Code cleanup. PersistentSearch.java: In process*() public methods, removed the long changeNumber attributes. Removed baseDN, scope and filter fields, and retrieve them directly from the SearchOperation. Extracted methods isInScope(), isInScopeForModify(), isAnyInScopeForModify(), matchesFilter(), anyMatchesFilter(), sendEntry(), createControls(). to factorize duplicated code. LocalBackend*Operation.java: Consequence of the changes to PersistentSearch.process*() methods. Code cleanup. ECLServerWriter.java: In publish(), consequence of the change to PersistentSearch.processAdd(). In doIt(), simplified code by extracting takeECLUpdate() method. git-svn-id: https://svn.forgerock.org/opendj/trunk@10973 41b1ffd8-f28e-4786-ab96-9950f0a78031
21 Aug, 2014
1 commit
-
to support cn=changelog CR-4083 Implementation of core features of the changelog backend: * Initialization and finalization of the backend * Search of the changelog, in cookie mode (with a cookie control) and draft compat mode (by change number) Note that : * The support for persistent searches is not implemented yet. * The changelog backend is currently not branched into code, i.e the directory server still uses the ECL workflow for "cn=changelog", because it is not possible to enable both changelog backend and ECL workflow at the same time (waiting for psearches implementation before branching the new code) Code changes: * ChangelogBackend.java: - implementation of search(), hasSubordinates(), numSubordinates(), and getEntryCount() methods * ReplicationServer.java: - new dependency on ChangelogBackend and ECLEnabledDomainPredicate - new constructor with ECLEnabledDomainPredicate argument - new methods enableExternalChangeLog() and shutdownExternalChangelog() as future replacement of enabledECL() and shutdownECL() - new method getDomainDNs(Set<DN>) for retrieval of domain DNs but an excluded set of dns - new method validateServerState(MultiDomainServerState, Set<DN>) for checking coherency of given state with the replication server * ReplicationDomainDB.java: - new method getCursorFrom(MultiDomainServerState, PositionStrategy, Set<DN>) that exclude a given set of domain DNs from the cursor obtained * FileChangelogDB.java, JEChangelogDB.java: - implementation of new method getCursorFrom(MultiDomainServerState, PositionStrategy, Set<DN>) * ECLEnabledDomainPredicate.java, ECLMultiDomainDBCursor.java: - update visibility to public in order to use these classes in ChangelogBackend * ChangelogBackedTestCase.java: - test of ChangelogBackend class, built from ExternalChangeLogTest.java, with lots of renaming, refactoring, cleaning compared to original class - majority of tests are disabled until the changelog backend is branched into code (as these tests require a running server) * MonitorTest.java: - update creation of ReplicationServer class to use a custom ECLEnabledDomainPredicate * replication.properties: - add messages for changelog backend git-svn-id: https://svn.forgerock.org/opendj/trunk@10970 41b1ffd8-f28e-4786-ab96-9950f0a78031
20 Aug, 2014
1 commit
-
Ported to FileReplicaDBTest additional checks for PositionStrategy.ON_MATCHING_KEY. These are the same that were previously added to JEReplicaDBTest. git-svn-id: https://svn.forgerock.org/opendj/trunk@10966 41b1ffd8-f28e-4786-ab96-9950f0a78031
19 Aug, 2014
7 commits
-
Implemented PositionStrategy.ON_MATCHING_KEY for JEChangelogDB.getCursorFrom(DN baseDN, int serverId). JEChangelogDB.java, JEReplicaDB.java: Implemented PositionStrategy.ON_MATCHING_KEY. JEReplicaDBCursor.java: Added new field positionStrategy. Simplified code in next() + added gotoNext(). ReplicationDB.java: In openReadCursor(), added PositionStrategy parameter. Made createReplicationKey() handle null CSNs. Inner class ReplServerDBCursor now implement DBCursor + Added getRecord() + Made next(), now return boolean instead of UpdateMsg + Extracted method computeCurrentRecord(). Added new field "UpdateMsg currentRecord". Added PositionStrategy parameter to ReplServerDBCursor ctor + protected special code for PositionStrategy.AFTER_MATCHING_KEY. JEReplicaDBTest.java: Added test cases for new PositionStrategy ON_MATCHING_KEY. Split assertFoundInOrder() in two: one each for AFTER_MATCHING_KEY and ON_MATCHING_KEY. In testGenerateCursorFrom(), changed the code to cover all CSNs. Extracted method assertNextCSN() and shutdown(). Used SoftAssertions. git-svn-id: https://svn.forgerock.org/opendj/trunk@10964 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@10959 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
…anges for new replicas and new domains Follow up of r10944 (and r10912 originally). Update ReplicaCursors with new replica offline information (For example, when replica came online or when there is more up to date replica offline information). Renamed ReplicaOfflineCursor(Test) to ReplicaCursor(Test) FileChangelogDB.java, JEChangelogDB.java: Added replicaCursors Map field. In getCursorFrom(), registered replicaCursors. In unregisterCursor(), handled ReplicaCursors. In notifyReplicaOnline() and notifyReplicaOffline(), called new method updateCursorsWithOfflineCSN(). ReplicaOfflineCursor.java: RENAMED to ReplicaCursor Removed returnReplicaOfflineMsg field. Changed replicaOfflineMsg field from ReplicaOfflineMsg to AtomicReference<ReplicaOfflineMsg>. In next(), rewrote the code to support resetting the replica offline CSN + added isReplicaOfflineMsgOutdated() and setOfflineCSN() Added replicaID and domainDB fields + called ReplicationDomainDB.unregisterCursor() in close() + added getReplicaID(). ReplicaOfflineCursorTest.java: RENAMED to ReplicaOfflineCursorTest Consequence of the change to ReplicaCursor. ChangeNumberIndexer.java: Removed outdated TODO git-svn-id: https://svn.forgerock.org/opendj/trunk@10958 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
…anges for new replicas and new domains Fixing a deadlock situation with ExternalChangeLogTest. When removing domains, the cursors were not properly closed by ChangeNumberIndexer.run() before calling Object.wait(). Relied on the fact that DBCursors are not thread safe so if client code calls MultiDomainDBCursor.removeDomain(), then the cursor is immediately removed. I did not see the problem before because unit tests on trunk execute by default with file based changelog db. ChangeNumberIndexer.java: In run(), simplified the code that removes the domain cursors. CompositeDBCursor.java: Removed removeNoLongerNeededCursors() and removedCursorsIterator() + extracted method removeCursor() from it. Added another removeCursor() which also removes from the exhaustedCursors. MultiDomainDBCursor.java Consequence of the change to CompositeDBCursor. Removed removeDomains field and removedCursorsIterator(). In removeDomain(), now call CompositeDBCursor.removeCursor(). DomainDBCursor.java: Consequence of the change to CompositeDBCursor. git-svn-id: https://svn.forgerock.org/opendj/trunk@10955 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
… create a new suffix on existing backend git-svn-id: https://svn.forgerock.org/opendj/trunk@10954 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@10952 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@10947 41b1ffd8-f28e-4786-ab96-9950f0a78031
12 Aug, 2014
1 commit
-
In ctor, removed useless code, because this case is already covered in next(). git-svn-id: https://svn.forgerock.org/opendj/trunk@10942 41b1ffd8-f28e-4786-ab96-9950f0a78031
11 Aug, 2014
1 commit
-
PBKDF2PasswordStorageScheme.java, PKCS5S2PasswordStorageScheme.java: Fixed a bug in PBKF2 + PKCS5S2 encodeOffline() methods which did not know how to deal with a byte[]. The right way was to wrap it in a ByteString like SaltedSHA1PasswordStorageScheme was already doing. BTW these encodeOffline() methods are never called from production code. Did more code factorization. Removed dead code in both with plainPlusSalt local variable which was not used for anything. Fixed a few bugs in PKCS5S2 where locks where not properly taken (or carefully avoided?). Made both PBKF2 + PKCS5S2 code look very similar now. PBKDF2PasswordStorageSchemeTestCase.java, PKCS5S2PasswordStorageSchemeTestCase.java, PasswordStorageSchemeTestCase.java, SaltedSHA1PasswordStorageSchemeTestCase.java, SaltedSHA256PasswordStorageSchemeTestCase.java, SaltedSHA384PasswordStorageSchemeTestCase.java, SaltedSHA512PasswordStorageSchemeTestCase.java: Removed dead code. CryptPasswordStorageSchemeTestCase.java: Made it reuse more code from PasswordStorageSchemeTestCase. git-svn-id: https://svn.forgerock.org/opendj/trunk@10941 41b1ffd8-f28e-4786-ab96-9950f0a78031
30 Jul, 2014
1 commit
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@10936 41b1ffd8-f28e-4786-ab96-9950f0a78031
25 Jul, 2014
3 commits
-
PBKDF2PasswordStorageSchemeTestCase.java: ADDED git-svn-id: https://svn.forgerock.org/opendj/trunk@10931 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
…anges for new replicas and new domains Created ECLMultiDomainDBCursor to only let ECL enabled domains reach the ChangeNumberIndexer. ChangeNumberIndexer.java: Wrapped the MultiDomainDBCursor into an ECLMultiDomainDBCursor. ECLMultiDomainDBCursor.java: ADDED JEChangelogDB.java, FileChangelogDB.java: Removed unnecessary calls to MultimasterREplication.isECLEnabledDomain(). git-svn-id: https://svn.forgerock.org/opendj/trunk@10930 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Used AutoRefactor. Reduced variable scopes. PBKDF2PasswordStorageScheme.java: Extracted methods getDigestBytes(), encodeAndMatch(), Removed unnecessary use of StringBuilders. In passwordMatches() and authPasswordMatches(), used String.indexOf(). PKCS5S2PasswordStorageScheme.java: See general changes. PKCS5S2PasswordStorageSchemeTestCase.java: In getTestPasswords(), reused the super method and filtered entries. git-svn-id: https://svn.forgerock.org/opendj/trunk@10929 41b1ffd8-f28e-4786-ab96-9950f0a78031
23 Jul, 2014
3 commits
-
…anges for new replicas and new domains Code Review: Nicolas Capponi Fixed regression introduced in r10912. It made fractional replication tests fail. ChangeNumberIndexer.initialize() must ignore ReplicaOfflineMsgs, just like ChangeNumberIndexer.run(). git-svn-id: https://svn.forgerock.org/opendj/trunk@10928 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
…anges for new replicas and new domains Fix done in r10925 ported to JE changelog implementation git-svn-id: https://svn.forgerock.org/opendj/trunk@10926 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
…anges for new replicas and new domains Fixed a problem introduced in r10918. In getExistingOrNewDomainMap(DN) method, the MultimasterReplication.isECLEnabledDomain() method is called. However, this method blocks forever at replication startup because MultimasterReplication state is equals to STARTING and is only set to RUNNING in code that occurs after in the same thread. Code sequence is : 1. SynchronizationProviderConfigManager calls MultimasterReplication.initializeSynchronizationProvider() try to call MultimasterReplication.isECLEnabledDomain() but MultimasterReplication state is equals to STARTING so it waits indefinitely on a state change 2. SynchronizationProviderConfigManager calls DirectoryServer.registerSynchronizationProvider(provider) MultimasterReplication state is set to RUNNING Add a check on registeredMultiDomainCursors to ensure that isECLEnabledDomain() is not called when the replication server is starting (as no cursors can be created yet). git-svn-id: https://svn.forgerock.org/opendj/trunk@10925 41b1ffd8-f28e-4786-ab96-9950f0a78031
22 Jul, 2014
1 commit
-
…kend to support cn=changelog Merged + corrected backend error messages by passing in the backendID into the error messages + fixed translations (!?!) Started implementing ChangelogBackend by adding error messages. Used Collections.emptySet() for supported controls and / or features, where applicable. Generecized Backend class with the type of the configuration object + applied specific types to sub-classes of Backend. Code cleanups + factorized code by extracting methods + ran AutoRefactor. git-svn-id: https://svn.forgerock.org/opendj/trunk@10923 41b1ffd8-f28e-4786-ab96-9950f0a78031
21 Jul, 2014
7 commits
-
to support cn=changelog CR-4053 Preparatory work for the changelog backend: add a new behavior to cursors, in order to be able to start cursor at a given key instead of starting just after. In order to avoid introducing another boolean in the methods, I created two enums to define the behavior of a cursor. Note that JE implementation does not yet implement the new behavior. * DBCursor class : add two enums KeyMatchingStrategy and PositionStrategy ** The new behavior corresponds to PositionStrategy.ON_MATCHING_KEY, which allow to position on the record with the given key (while AFTER_MATCHING_KEY position just after the record with the given key). * ReplicationDomainDB : add PositionStrategy argument for all methods that returns a cursor * ReplicationServerDomain : getCursorFrom(DN, ServerState) method calls underlying method with PositionStrategy.AFTER_MATCHING_KEY * FileChangelogDB : add PositionStrategy argument for all methods that returns a cursor * FileReplicaDB : add PositionStrategy argument to generateCursorFrom(CSN) method * FileReplicaDBCursor : add PositionStrategy argument to the constructor, implement the new behavior when position strategy is ON_MATCHING_KEY * DomainDBCursor, MultiDomainDBCursor : add PositionStrategy argument to the constructor, pass the strategy to underlying cursors * Log, LogFile, BlockLogReader : implement the new behavior when position strategy is ON_MATCHING_KEY * ChangeNumberIndexer : use AFTER_MATCHING_KEY strategy when retrieving the cursor (no behavior change) * JEChangelogDB : add PositionStrategy argument for all methods that returns a cursor, but getCursorFrom(DN, int, CSN, PositionStrategy) method does NOT implement the new ON_MATCHING_KEY strategy. * Update of tests classes to match method signature but no new tests added for the new behavior (ON_MATCHING_KEY) - to be done later git-svn-id: https://svn.forgerock.org/opendj/trunk@10922 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
to support cn=changelog CR-4052 Revert previous changes corresponding to CR-4052 as a better approach is to implement the processing of "Changelog Exchange Control" directly in the changelog backend. git-svn-id: https://svn.forgerock.org/opendj/trunk@10921 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@10919 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
…anges for new replicas and new domains Fixed a problem introduced in r10912. Problem was due to removing domains from the MultiDomainDBCursor: In CompositeDBCursor.removeNoLongerNeededCursors(), code iterates over cursors and then forget baseDNs to remove only they match with a cursor. Problem is that it should be the other way around: iterate over the baseDNs to remove and always forget them whether or not a matching cursor is found. ChangeNumberIndexer.java: In run(), better handled the removed domains. CompositeDBCursor.java: In removeNoLongerNeededCursors(), iterate over the baseDNs to remove, find a cursor and remove it if found, then always forget the baseDN. Added abstract method removedCursorsIterator(). Removed isCursorNoLongerNeededFor() and cursorRemoved(). DomainDBCursor.java, MultiDomainDBCursor.java, CompositeDBCursorTest.java: Consequence of the changes to CompositeDBCursor. ExternalChangeLogTest.java: Code cleanup. Extracted method readMessages() to factorize code. Added method assertLastCookieDifferentThanLastValue() to loop until last cookie is updated. Added inner class Results. FileChangelogDB.java, JEChangelogDB.java: In getExistingOrNewDomainMap(), only add the new domain if the baseDN is from an ECL enabled domain. FileReplicaDBCursor.java: Fixed javadoc. git-svn-id: https://svn.forgerock.org/opendj/trunk@10918 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
to support cn=changelog CR-4052 Preparatory work for the changelog backend: make the "Changelog Exchange Control" available to the backend when search(SearchOperation) method is called * LocalBackendSearchOperation#handleRequestControls() method: handle the "Changelog Exchange Control" : add it to the SearchOperation if provided in the request * SearchOperation, SearchOperationBasis and SearchOperationWrapper classes: add getter and setter for the "Changelog Exchange Control" (ECLRequestControl class) * core.properties : add new message for case when "Changelog Exchange Control" is requested but not supported by a backend git-svn-id: https://svn.forgerock.org/opendj/trunk@10917 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
to support cn=changelog Skeleton of the new backend class : ChangelogBackend.java git-svn-id: https://svn.forgerock.org/opendj/trunk@10916 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
to support cn=changelog CR-4036 Preparatory work : change implementation of virtual attribute providers related to external changelog to be independant of ECL workflow * ReplicationServer class: ** remove duplication of virtual attribute providers creation (for registering and deregistering) ** create virtual attribute providers by injecting the replication server instance * FirstChangeNumberVirtualAttributeProvider, LastChangeNumberVirtualAttributeProvider, LastCookieVirtualProvider classes: ** inject ReplicationServer in constructor in order to use it in getValues() method ** remove ConfigurationChangeListener implementation because no config change can happen * ChangelogBaseDNVirtualAttributeProvider class: ** remove ConfigurationChangeListener implementation because no config change can happen git-svn-id: https://svn.forgerock.org/opendj/trunk@10915 41b1ffd8-f28e-4786-ab96-9950f0a78031
19 Jul, 2014
1 commit
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@10914 41b1ffd8-f28e-4786-ab96-9950f0a78031