mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Valery Kharseko
49 mins ago ef7010639a3859f48bee38b76567d1b84eb097e3
refs
author Valery Kharseko <vharseko@3a-systems.ru>
Saturday, November 28, 2026 10:45 +0100
committer GitHub <noreply@github.com>
Saturday, November 28, 2026 10:45 +0100
commitef7010639a3859f48bee38b76567d1b84eb097e3
tree 2eb7b9b782a36709a01bf7890032b5c7d704069e tree | zip | gz
parent 2a538069c90aa87d5dc8817edc6095099cc2b2f3 view | diff
[#807] Preserve concurrent LDAP persistent search notifications (#1345)

Fixes #807.

## Cause

The [Ubuntu / JDK 27
build](https://github.com/OpenIdentityPlatform/OpenDJ/actions/runs/46019713357/job/140575884485)
showed two successful MODIFY operations and a registered persistent
search that never delivered the second notification. The client can
receive the first entry while the server is still returning from that
socket write. A second modification can then emit into the same response
stream from a different worker. RxJava's StrictSubscriber discards the
overlapping onNext before it reaches the bounded response queue.

## Changes

- Enqueue responses from concurrent workers directly into the bounded
queue and use one drain to deliver them in queue order.
- Keep the 32-response capacity and write timeout. Wake waiting workers
when space becomes available or the stream ends. Queue the final LDAP
response and mark completion under the same lock.
- Add an LDAP transport regression test that holds the first writer
after its bytes reach the socket, completes a second MODIFY, and checks
that the client receives both notifications.

## Verification

- On the base commit, the new scenario timed out waiting for the second
notification after both modifications succeeded.
- On the patched branch, 210 tests passed under the precommit Maven
profile on OpenJDK 27 and macOS. The run covered the transport
regression, AliasTestCase, persistent search, changelog, search
operations, LDAPv2, and connection handling.
- `git diff --check` passed.
2 files modified
458 ■■■■■ changed files
opendj-server-legacy/src/main/java/org/forgerock/opendj/reactive/LDAPClientConnection2.java 344 ●●●●● diff | view | raw | blame | history
opendj-server-legacy/src/test/java/org/opends/server/protocols/ldap/LDAPConnectionHandler2TransportTestCase.java 114 ●●●●● diff | view | raw | blame | history