You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/10/27 13:51:09 UTC

[GitHub] [spark] srowen commented on a change in pull request #30139: [SPARK-31069][CORE] high cpu caused by chunksBeingTransferred in external shuffle service

srowen commented on a change in pull request #30139:
URL: https://github.com/apache/spark/pull/30139#discussion_r512707924



##########
File path: common/network-common/src/main/java/org/apache/spark/network/server/OneForOneStreamManager.java
##########
@@ -43,6 +43,8 @@
 
   private final AtomicLong nextStreamId;
   private final ConcurrentHashMap<Long, StreamState> streams;
+  private Long numChunksBeingTransferred = 0L;

Review comment:
       Why not `long`?

##########
File path: common/network-common/src/main/java/org/apache/spark/network/server/OneForOneStreamManager.java
##########
@@ -123,7 +125,10 @@ public void connectionTerminated(Channel channel) {
     for (Map.Entry<Long, StreamState> entry: streams.entrySet()) {
       StreamState state = entry.getValue();
       if (state.associatedChannel == channel) {
-        streams.remove(entry.getKey());
+        synchronized (lock) {
+          streams.remove(entry.getKey());

Review comment:
       Is locking on `streams` not sufficient?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org