Github user zsxwing commented on the pull request:
https://github.com/apache/spark/pull/1542#issuecomment-50236563
@javadba, sorry that maybe my previous comment is not clear.
I'm opposed to use `synchronized` on `val monitor =
shuffleId.toString.intern`. I see you have to use `intern` to get the same
monitor for the same `shuffleId`. However, such usage will be a trap and
surprise the developers. For example, if we allow to use `synchronized` on a
`String.intern`, the following irrelevant codes may use the same monitor
`shuffleId.toString.intern`:
```scala
def foo(bar: Int) {
bar.toString.intern.synchronized {
...
}
}
```
This will definitely be hard to debug and track.
What's more, I agree with @JoshRosen and also want to see an real test on
these codes to demonstrate the improvement of your modification.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---