GitHub user zsxwing opened a pull request:
https://github.com/apache/spark/pull/22770
[SPARK-25771][PYSPARK]Fix improper synchronization in PythonWorkerFactory
## What changes were proposed in this pull request?
Fix the following issues in PythonWorkerFactory
- MonitorThread.run uses a wrong lock.
- `createSimpleWorker` misses `synchronized` when updating `simpleWorkers`.
Other changes are just to improve the code style to make the thread-safe
contract clear.
## How was this patch tested?
(Please explain how this patch was tested. E.g. unit tests, integration
tests, manual tests)
(If this patch involves UI changes, please attach a screenshot; otherwise,
remove this)
Please review http://spark.apache.org/contributing.html before opening a
pull request.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/zsxwing/spark pwf
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/22770.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #22770
----
commit 0369de2323640377c0f990bb47ebe112654ca498
Author: Shixiong Zhu <zsxwing@...>
Date: 2018-10-18T20:39:04Z
fix improper synchronization
----
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]