Our commons Promise API does not support cancellation chaining. Since the LDAP client SDK returns chained promises it is not possible to abandon/cancel a request via the promise's cancel() method.
The implication is that long running proxied operations, such as persistent searches, are never cancelled, even if the associated client disconnects, since the life-cycle of frontend connections is decoupled from the life-cycle of backend connections.
As a workaround we may want to consider implementing special handling for persistent searches, e.g. by allocating a non load-balanced specialized connection for each psearch in order to avoid promise chaining used by request based load-balancers.
In the long term, we should migrate the LDAP SDK client APIs to RxJava (
OPENDJ-3654) where chained cancellation is supported, as well as the back-pressure support which we also need for a scalable proxy.