KEMBAR78
Fix "Operator has been terminated" by Michael-A-McMahon · Pull Request #134 · oracle/oracle-r2dbc · GitHub
Skip to content

Conversation

@Michael-A-McMahon
Copy link
Member

Fixes #133

This branch corrects what appears to be unsupported usage of the Project Reactor API. Oracle R2DBC was combining Flux.concatDelayError with Flux.doOnCancel to trigger resource clean up upon termination with onComplete, onError, or cancel.

My understanding of Project Reactor is this:
If the (concatDelayError + doOnCancel) publisher receives onComplete, it stores a reference to reactor.core.Exceptions.TERMINATED. If this publisher then receives a cancel, it sees the reference to TERMINATED and reports it as a dropped error. The message of TERMINATED is "Operator has been terminated", which will appear in stderr or in log messages.

The fix is to simply to use the Flux.usingWhen method to trigger resource clean up. I believe this is the intended usage of the Project Reactor API, so it should serve us better than what we had before.

@Michael-A-McMahon Michael-A-McMahon merged commit 852f641 into main Oct 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OCA Verified All contributors have signed the Oracle Contributor Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Operator has been terminated issue with RowsFetchSpec and Spring DatabaseClient

2 participants