Skip to content

Conversation

@viirya
Copy link
Member

@viirya viirya commented Apr 28, 2015

@SparkQA
Copy link

SparkQA commented Apr 28, 2015

Test build #31138 has finished for PR 5743 at commit 3b3f38a.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.
  • This patch does not change any dependencies.

@andrewor14
Copy link
Contributor

@aarondav @rxin

@aarondav
Copy link
Contributor

This is a reasonable solution, but I think that the actual issue that TransportRequestHandler has a list of streamIds at all. I think a different solution would be to have the StreamManager associated streams with channels (which is a documented guarantee already to StreamManager).

This would involve making StreamManager's getChunk take a TransportClient (or a "channelId", generated via channel.toString), which would update the StreamState, and then to make connectionTerminated also take this identifier (iterating over all streams to close associated ones).

@viirya
Copy link
Member Author

viirya commented Apr 29, 2015

@aarondav Sounds reasonable. However, this might increase more complexity to the codes. The current solution is very simple compared to the alternative one.

In addition to modifying TransportRequestHandler, StreamManager, OneForOneStreamManager, there are many existing unit tests involving StreamManager. Once StreamManager's current interface (especially getChunk) is updated, these tests are needed to largely modified. I think it is not worth doing that.

I update the codes based on your suggestion, but keep getChunk untouched. Please take a look. If you agree these additional complexity is not needed, I can revert it to current solution.

@SparkQA
Copy link

SparkQA commented Apr 29, 2015

Test build #31213 has finished for PR 5743 at commit 37a4b6c.

  • This patch fails to build.
  • This patch merges cleanly.
  • This patch adds no public classes.
  • This patch does not change any dependencies.

@SparkQA
Copy link

SparkQA commented Apr 29, 2015

Test build #31219 has finished for PR 5743 at commit 17f020f.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.
  • This patch does not change any dependencies.

@viirya
Copy link
Member Author

viirya commented Apr 29, 2015

Looks like unrelated failure. Please test again.

@SparkQA
Copy link

SparkQA commented Apr 29, 2015

Test build #31265 has finished for PR 5743 at commit 45908b7.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.
  • This patch adds the following new dependencies:
    • spark-unsafe_2.10-1.4.0-SNAPSHOT.jar

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove this method, it should no longer be used.

@viirya
Copy link
Member Author

viirya commented May 1, 2015

@aarondav Thanks for comments. I updated the codes.

@SparkQA
Copy link

SparkQA commented May 1, 2015

Test build #31547 has finished for PR 5743 at commit d35f19a.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • case class ExecutorUIData(

@SparkQA
Copy link

SparkQA commented May 1, 2015

Test build #31549 has finished for PR 5743 at commit 97e205c.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, good point, this is safe because our Map is a ConcurrentHashMap (or else you would need to use an iterator to remove it safely). Would you mind making the left-hand type of the declaration of streams a ConcurrentHashMap? This is not the first place where we rely on the semantics of a ConcurrentHashMap over a general Map, and we should use proper style therefore.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Making sense. Updated.

@aarondav
Copy link
Contributor

aarondav commented May 1, 2015

Just a couple remaining comments, otherwise this LGTM!

@SparkQA
Copy link

SparkQA commented May 1, 2015

Test build #31574 has finished for PR 5743 at commit cf2c086.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@aarondav
Copy link
Contributor

aarondav commented May 1, 2015

LGTM, merging in to master. Thanks!

@asfgit asfgit closed this in 1686032 May 1, 2015
jeanlyn pushed a commit to jeanlyn/spark that referenced this pull request May 28, 2015
…eamIds

JIRA: https://issues.apache.org/jira/browse/SPARK-7183

Author: Liang-Chi Hsieh <[email protected]>

Closes apache#5743 from viirya/fix_requesthandler_memory_leak and squashes the following commits:

cf2c086 [Liang-Chi Hsieh] For comments.
97e205c [Liang-Chi Hsieh] Remove unused import.
d35f19a [Liang-Chi Hsieh] For comments.
f9a0c37 [Liang-Chi Hsieh] Merge remote-tracking branch 'upstream/master' into fix_requesthandler_memory_leak
45908b7 [Liang-Chi Hsieh] for style.
17f020f [Liang-Chi Hsieh] Remove unused import.
37a4b6c [Liang-Chi Hsieh] Remove streamIds from TransportRequestHandler.
3b3f38a [Liang-Chi Hsieh] Fix memory leak of TransportRequestHandler.streamIds.
jeanlyn pushed a commit to jeanlyn/spark that referenced this pull request Jun 12, 2015
…eamIds

JIRA: https://issues.apache.org/jira/browse/SPARK-7183

Author: Liang-Chi Hsieh <[email protected]>

Closes apache#5743 from viirya/fix_requesthandler_memory_leak and squashes the following commits:

cf2c086 [Liang-Chi Hsieh] For comments.
97e205c [Liang-Chi Hsieh] Remove unused import.
d35f19a [Liang-Chi Hsieh] For comments.
f9a0c37 [Liang-Chi Hsieh] Merge remote-tracking branch 'upstream/master' into fix_requesthandler_memory_leak
45908b7 [Liang-Chi Hsieh] for style.
17f020f [Liang-Chi Hsieh] Remove unused import.
37a4b6c [Liang-Chi Hsieh] Remove streamIds from TransportRequestHandler.
3b3f38a [Liang-Chi Hsieh] Fix memory leak of TransportRequestHandler.streamIds.
nemccarthy pushed a commit to nemccarthy/spark that referenced this pull request Jun 19, 2015
…eamIds

JIRA: https://issues.apache.org/jira/browse/SPARK-7183

Author: Liang-Chi Hsieh <[email protected]>

Closes apache#5743 from viirya/fix_requesthandler_memory_leak and squashes the following commits:

cf2c086 [Liang-Chi Hsieh] For comments.
97e205c [Liang-Chi Hsieh] Remove unused import.
d35f19a [Liang-Chi Hsieh] For comments.
f9a0c37 [Liang-Chi Hsieh] Merge remote-tracking branch 'upstream/master' into fix_requesthandler_memory_leak
45908b7 [Liang-Chi Hsieh] for style.
17f020f [Liang-Chi Hsieh] Remove unused import.
37a4b6c [Liang-Chi Hsieh] Remove streamIds from TransportRequestHandler.
3b3f38a [Liang-Chi Hsieh] Fix memory leak of TransportRequestHandler.streamIds.
@viirya viirya deleted the fix_requesthandler_memory_leak branch December 27, 2023 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants