Skip to content

Conversation

@squito
Copy link
Contributor

@squito squito commented Jul 29, 2015

@squito
Copy link
Contributor Author

squito commented Jul 29, 2015

any suggestions on a test that doesn't require 2 GB of memory?

@shivaram
Copy link
Contributor

LGTM. Could we also check all the other instances where alignSize is called ?

@SparkQA
Copy link

SparkQA commented Jul 29, 2015

Test build #38853 has finished for PR 7750 at commit bc1cb82.

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

@squito
Copy link
Contributor Author

squito commented Jul 29, 2015

@shivaram good idea. I updated one more spot where it seems there could be overflow -- I will admit I don't completely understand what is going on there, but the change seems safe. the only other place its called is https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/util/SizeEstimator.scala#L217 which is not going to overflow.

@srowen
Copy link
Member

srowen commented Jul 29, 2015

Does the val size = math.min(s1, s2) line need toLong too? it gets multiplied by a big number before being divided by one. I could be missing why it's not needed or can't be done but seemed like a possible issue.

@squito
Copy link
Contributor Author

squito commented Jul 29, 2015

s1 & s2 are already longs, which means so is size -- so no change needed there.
(not that I had checked this before you mentioned it ...)

@shivaram
Copy link
Contributor

Yeah its tricky to add a test case for this -- We could do it by refactoring the code and testing a smaller function which takes in the array size as an argument etc. but that'll be a much bigger code change. Since this is a more contained change I'd actually recommend just merging the current diff for now.

@SparkQA
Copy link

SparkQA commented Jul 29, 2015

Test build #38877 has finished for PR 7750 at commit 29493f1.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@squito
Copy link
Contributor Author

squito commented Jul 30, 2015

Jenkins, retest this please

@SparkQA
Copy link

SparkQA commented Jul 30, 2015

Test build #149 has finished for PR 7750 at commit 29493f1.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Jul 30, 2015

Test build #38932 has finished for PR 7750 at commit 29493f1.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@squito
Copy link
Contributor Author

squito commented Jul 30, 2015

Jenkins, retest this please

@SparkQA
Copy link

SparkQA commented Jul 30, 2015

Test build #162 has finished for PR 7750 at commit 29493f1.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Jul 30, 2015

Test build #39039 has finished for PR 7750 at commit 29493f1.

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

@shivaram
Copy link
Contributor

LGTM. Merging this

@asfgit asfgit closed this in 06b6a07 Jul 30, 2015
markhamstra pushed a commit to markhamstra/spark that referenced this pull request Jul 31, 2015
https://issues.apache.org/jira/browse/SPARK-9437

Author: Imran Rashid <[email protected]>

Closes apache#7750 from squito/SPARK-9437_size_estimator_overflow and squashes the following commits:

29493f1 [Imran Rashid] prevent another potential overflow
bc1cb82 [Imran Rashid] avoid overflow
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