-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Not Needed
-
From PR: https://github.com/mongodb/mongo-java-driver/pull/1096
Hi there,
We use Mongodb reactive stream driver with akka-stream and had an issue when trying to upgrade our mongodb driver from 4.1.x to 4.9.0. The same code which was working with 4.1.x does not work anymore with 4.9.0.
We tracked downed the issue and it's happening since the addition of reactor to this project.
The issue is that when performing a find/distinct which returns null values, when the results are used in a SerializedFluxSink a NullPointerException is thrown and everything stops. This is because SerializedFluxSink.next performs a call to Object.requireNonNull().
To fix this NPE we filter out null values from the results.
I'm not sure this is the appropriate way to test/fix, suggestions are welcome.
In the meantime we workaround this on our side by filtering out null values in the query.
Thanks