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

Valery Kharseko
16 hours ago 48f3197de5cbfe0cc0110d95b8d53e3d2c527fe4
refs
author Valery Kharseko <vharseko@3a-systems.ru>
Monday, November 30, 2026 20:55 +0100
committer GitHub <noreply@github.com>
Monday, November 30, 2026 20:55 +0100
commit48f3197de5cbfe0cc0110d95b8d53e3d2c527fe4
tree cb2d94287513d934b0ab058150bd1b0b15e10e27 tree | zip | gz
parent 2863452733f1815ce5557ff01cfe148b49e182b0 view | diff
Preserve LDAP Search response order across Bind (#1350)

## Summary

- Wait for Search responses already being handed to Grizzly before
submitting a Bind to the work queue. Discard older buffered Search
responses and keep the wait off the request and work-queue threads.
- Submit deferred Binds through a bounded dispatcher. The standard
work-queue strategy tries admission without waiting for capacity. If the
work queue rejects the Bind, cancel outstanding operations before
replying. If the dispatcher is saturated, close the connection.
- Clear authorization and SASL negotiation state before reopening
admission after a work-queue rejection, including when no Search handoff
was pending.
- Complete a deferred Bind when its connection closes. Use operation
identity during reactive LDAP cleanup and group persistent Search
registrations by connection-local operation ID. Late completion or
cancellation preserves a replacement operation that reuses its message
ID.

## Verification

- Maven `verify -Pprecommit` on JDK 11 passed 1,449 targeted tests
before the rebase and 42 Bind ordering, LDAP transport and persistent
Search tests after rebasing onto `master` (`2863452`). Both runs had
zero failures, errors or skips.
- The regression tests cover successful and rejected Binds, discarding
buffered responses, a disconnect during the handoff and message ID
reuse. The two original response-order assertions failed before the fix.
- The review regressions verify anonymous authorization and cleared SASL
state after a queue-rejected Bind with no Search handoff. They also
verify that cancellation groups the old Search registrations and
preserves a replacement that reuses the message ID. Both assertions
failed before the fixes.
- `git diff --check` passed.
7 files modified
1 files added
537 ■■■■■ changed files
opendj-server-legacy/src/main/java/org/forgerock/opendj/reactive/LDAPClientConnection2.java 187 ●●●●● diff | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/api/ClientConnection.java 10 ●●●●● diff | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/core/PersistentSearch.java 4 ●●●●● diff | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/core/QueueingStrategy.java 11 ●●●●● diff | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/core/WorkQueueStrategy.java 9 ●●●●● diff | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/types/AbstractOperation.java 4 ●●●●● diff | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/workflowelement/localbackend/LocalBackendSearchOperation.java 3 ●●●●● diff | view | raw | blame | history
opendj-server-legacy/src/test/java/org/forgerock/opendj/reactive/LDAPBindResponseOrderTest.java 309 ●●●●● diff | view | raw | blame | history