RejectedExecutionException when use spark mongo connector v10.0.4

https://jira.mongodb.org/browse/JAVA-4551

upgrade to 4.6.0+ java driver will fix this ?

Yes, looks like you are hitting the same bug as JAVA-4551

use mongo-spark-connector-10.0.4.jar with mongodb-driver-sync-4.7.1.jar (download to classpath) fix this

but pyspark --packages org.mongodb.spark:mongo-spark-connector:10.0.4 will download mongodb-driver-sync-4.5.1.jar by default.

waiting a bug fix version