-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Ensure that AsyncReadWriteBinding is released prior to subscriber notification #676
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does anyone else find syncToCallback confusing? It seems more like the reverse, callbackToSink, makes more sense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It converts the sink to a SingleResultCallback so makes sense to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know what's going on with the indentation settings here.
…ification Previously the driver assumed that Mono#doOnTerminate is executed prior to the subscriber being notified of completion. But it turns out that behavior is not guaranteed in the Californium release of Project Reactor (though it is in later releases). So instead, now the SingleResultCallback that is used to notify the Mongo of completion is wrapped by one that first releases the binding, and Mono#doOnTerminate is no longer used. JAVA-4027
rozza
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - did this cause any tests to fail?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It converts the sink to a SingleResultCallback so makes sense to me.
|
Yes, see the analysis in JAVA-3969. It's the root cause of the failure of one of the sessions spec tests. |
|
Good detective work :) |
...tive-streams/src/main/com/mongodb/reactivestreams/client/internal/OperationExecutorImpl.java
Outdated
Show resolved
Hide resolved
…ification (#676) Previously the driver assumed that Mono#doOnTerminate is executed prior to the subscriber being notified of completion. But it turns out that behavior is not guaranteed in the Californium release of Project Reactor (though it is in later releases). So instead, now the SingleResultCallback that is used to notify the Mongo of completion is wrapped by one that first releases the binding, and Mono#doOnTerminate is no longer used. JAVA-4027
…ification (mongodb#676) Previously the driver assumed that Mono#doOnTerminate is executed prior to the subscriber being notified of completion. But it turns out that behavior is not guaranteed in the Californium release of Project Reactor (though it is in later releases). So instead, now the SingleResultCallback that is used to notify the Mongo of completion is wrapped by one that first releases the binding, and Mono#doOnTerminate is no longer used. JAVA-4027
…iber notification (mongodb#676)" This reverts commit 9bba683.
Previously the driver assumed that Mono#doOnTerminate is executed
prior to the subscriber being notified of completion. But it turns
out that behavior is not guaranteed in the Californium release of
Project Reactor (though it is in later releases). So instead,
now the SingleResultCallback that is used to notify the Mongo of
completion is wrapped by one that first releases the binding, and
Mono#doOnTerminate is no longer used.
JAVA-4027