Class MonoBridge<T>

java.lang.Object
com.couchbase.client.core.transaction.util.MonoBridge<T>

@Internal public class MonoBridge<T> extends Object
Protects against concurrent op cancellation.

In reactive, if have multiple concurrent ops, if one fails then all the others will just stop executing once the error is raised past them in the chain. As if concurrent ops are being done with concatMap/flatMap, once the FluxConcatMap operator gets onError, it calls cancel() on its internal stream.

To avoid this, on a ctx.insert(), a MonoBridge is returned to the lambda and the actual work is started on a separate chain, whose signals are forwarded to the MonoBridge. That chain is then protected from any cancellation events, which the MonoBridge will receive.

Since this work, a CANCEL signal should not appear internally, and is possible indicative of an internal bug if it does.