•  
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Backport fix OPENDJ-1614 (CR-5290) Improve crontab(5) support in recurring tasks
    • -73
    • +90
    ./server/backends/task/RecurringTask.java
  1. … 2 more files in changeset.
OPENDJ-1611 Check serverState before returning a message

Two updates to the fix:

- always checks serverState before returning a message in

MessageHandler.getNextMessage() method

- doesn't exclude source handler from connectedDSs in

ReplicationServerDomain.take() method

    • -4
    • +9
    ./server/replication/server/MessageHandler.java
OPENDJ-1611 CR-5492 Filter replicaIds when filling late queue in MessageHandler
    • -5
    • +18
    ./server/replication/server/MessageHandler.java
OPENDJ-1618 (CR-5155) External changelog not purged after the purge delay

The ChangelogDBPurger is smart: when changes exist in the DB, it sleeps until the oldest change can be purged.

The problem is that when admin changes the purge delay, the ChangelogDBPurger is not woken up to verify if the oldest change can be purged with the purge delay.

This fix wakes up the ChangelogDBPurger when the purge delay changes.

FileChangelogDB.java, JEChangelogDB.java:

In setPurgeDelay(), ensured an existing ChangelogDBPurger is woken up by a change to the purge delay.

Made purgeDelayInMillis volatile + In ChangelogDBPurger.run(), inlined jeFriendlySleep() to ensure the wait time is computed from the very latest purgeDelayInMillis.

OPENDJ-1613 (CR-5064) NullPointerException while searching on ch=changelog

The problem happens when doing a search in the change number changelog.

It only appears when there are two replicas under the same domain.

When creating the domain cursor, it is initialized from the content of the change number index DB. A replica cursor is created for each replica. The first replica cursor is initialized from the CSN coming from the change number index DB while the second replica cursor is initialized from the null CSN.

Under this circumstance, the second replica cursor is immediately added to the exhausted cursors of the domain cursor, and never gets out of it despite its replica DB being not empty.

The reason is because next() is never called on the the underlying ReplServerDBCursor.

JEReplicaDBCursor.java:

In next(), test whether the cursor has already been initialized (rather than verifying if a previous record exists) in order to verify if this is the first time next() is called.

Removed currentChange field which duplicates the content of ReplServerDBCursor.currentRecord .

Better handled the cursor closed state in all the methods.

Updated copyrights after r11216.
  1. … 3 more files in changeset.
OPENDJ-1571 Internal Error when doing REST operations on HTTP Connection Handler

As pointed out by Ludo, problem is due to an API change in InternalClientConnection.processSearch() where LinkedHashSets parameters have been replaced with Set.

Reverted revision r9082 which introduced the problem.

Changed all client code to use LinkedHashSets instead of Sets.

CollectionUtils.java:

Added missing methods implemented in TestCaseUtils.

TestCaseUtils.java, LDAPReplicationDomain.java:

Removed generic methods creating collections.

  1. … 15 more files in changeset.
OPENDJ-1606 (CR-4909) ConcurrentModificationException while performing modify operation against two replicated DS

Fixed ConcurrentModificationException.

I suspect the NoSuchElementException is thrown by the desugared foreach loop on an ArrayList.

JEChangelogDB.java, FileChangelogDB.java:

FOr the fields registeredDomainCursors and replicaCursors, replaced the use of ArrayList + synchronized keywords with using ConcurrentSkipListMap + CopyOnWriteArrayList to ensure thread safe access/modifications of these MultiMaps.

Created putInMultiMap().

Aligned code between the 2 implementations.

Fix for OPENDJ-1586: Changes in processSearch to iterate through nested groups members 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.

    • -2
    • +2
    ./server/extensions/IsMemberOfVirtualAttributeProvider.java
Fix for OPENDJ-1580 : Upgrade: add task for password storage scheme PKCS5S2.

    • -0
    • +12
    ./server/tools/upgrade/Upgrade.java
  1. … 1 more file in changeset.
Additional fix for OPENDJ-1358: Backup task logs path in ID field, and ID in path field
    • -1
    • +1
    ./server/backends/jeb/BackupManager.java
Fix for OPENDJ-1586: Changes in processSearch to iterate through nested groups members 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

    • -6
    • +26
    ./server/extensions/IsMemberOfVirtualAttributeProvider.java
Fix for OPENDJ-1586: Changes in processSearch to iterate through nested groups members when a search is based on a filter of the isMemberOf attribute.
    • -19
    • +45
    ./server/extensions/IsMemberOfVirtualAttributeProvider.java
  1. … 1 more file in changeset.
OPENDJ-1375 CR-4618: prevent deadlocks when updating id2subtree using IndexBuffers

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.

    • -1
    • +7
    ./server/backends/jeb/IndexBuffer.java
OPENDJ-1565 CR-4564: Optionally bind to a local address
    • -2
    • +6
    ./server/extensions/LDAPPassThroughAuthenticationPolicyFactory.java
  1. … 11 more files in changeset.
OPENDJ-1574 CR-4564: Allow editing of single-valued InetAddress properties
OPENDJ-1548 (CR-4579) In changelog backend, persistent searches should perform the 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.

    • -26
    • +45
    ./server/backends/ChangelogBackend.java
OPENDJ-1487 CR-4580 Prevent opened cursors when cleaning the file-based changelog

Prevent race condition by proper synchronization in

FileChangeLogDB#shutdownDB() method

Add missing synchronization on replicaCursors in FileChangelogDB class
OPENDJ-1569 Persistent search on cn=changelog does not return updates

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.

    • -8
    • +16
    ./server/backends/ChangelogBackend.java
OPENDJ-1560 modify/modifyrdn operations are not working in mix replication topology

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.

Rename type parameter of CompositeDBCursor class from Data to T
OPENDJ-1444 CR-4537 Remove previous cookie from storage of ChangeNumberIndexDB

* 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

    • -18
    • +11
    ./server/replication/server/changelog/file/Log.java
    • -14
    • +39
    ./server/backends/ChangelogBackend.java
  1. … 18 more files in changeset.
OPENDJ-1544 encode-password tool fails with java.lang.NullPointerException

DirectoryServer.java

Extracted initializeAuthenticatedUsers().

EncodePassword.java:

In initializeServerComponents(), called DirectoryServer.initializeAuthenticatedUsers() to initialize DirectoryServer.authenticatedUsers and avoid the NPE.

Extracted method listPasswordStorageSchemes().

Code cleanup.

    • -169
    • +109
    ./server/tools/EncodePassword.java
Revert from usage of forgerock-util module to equivalent classes from SDK

in order to fix build after switch back from OpenDJ SDK 3.0.0-SNAPSHOT

to 2.6.10-SNAPSHOT

OPENDJ-1541 (CR-4516) Persistent search on cn=changelog can return duplicates

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().

OPENDJ-1541 (CR-4516) Persistent search on cn=changelog can return duplicates

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().

    • -128
    • +406
    ./server/backends/ChangelogBackend.java
OperationWrapper.java, AbstractOperation.java, Operation.java, PluginOperation.java:

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.

    • -168
    • +71
    ./server/core/OperationWrapper.java
    • -12
    • +19
    ./server/types/AbstractOperation.java
Fixed a NPE in ChangelogBackendTestCase.
    • -2
    • +2
    ./server/backends/ChangelogBackend.java
Fixed checkstyle error.
    • -2
    • +0
    ./server/backends/ChangelogBackend.java