Uh oh!
There was an error while loading. Please reload this page.
[SPARK-35543][CORE][FOLLOWUP] Fix memory leak in BlockManagerMasterEndpoint removeRdd - #33020
[SPARK-35543][CORE][FOLLOWUP] Fix memory leak in BlockManagerMasterEndpoint removeRdd#33020attilapiros wants to merge 3 commits into
Conversation
attilapiros
commented
Jun 22, 2021
cc @mridulm |
SparkQA
commented
Jun 22, 2021
Test build #140133 has finished for PR 33020 at commit
|
SparkQA
commented
Jun 22, 2021
Kubernetes integration test starting |
SparkQA
commented
Jun 22, 2021
Test build #140135 has finished for PR 33020 at commit
|
SparkQA
commented
Jun 22, 2021
Kubernetes integration test status failure |
build error is unrelated: Jenkins retest this please |
SparkQA
commented
Jun 22, 2021
Kubernetes integration test unable to build dist. exiting with code: 1 |
SparkQA
commented
Jun 22, 2021
Kubernetes integration test starting |
SparkQA
commented
Jun 22, 2021
Kubernetes integration test status failure |
gengliangwang
commented
Jun 22, 2021
@attilapiros Thanks for coming up with a better fix. |
SparkQA
commented
Jun 22, 2021
Test build #140138 has finished for PR 33020 at commit
|
mridulm
left a comment
There was a problem hiding this comment.
Thanks for fixing this @attilapiros !
Uh oh!
There was an error while loading. Please reload this page.
SparkQA
commented
Jun 23, 2021
Kubernetes integration test starting |
SparkQA
commented
Jun 23, 2021
Kubernetes integration test status failure |
SparkQA
commented
Jun 23, 2021
Test build #140203 has finished for PR 33020 at commit
|
mridulm
commented
Jun 24, 2021
Thanks for fixing this @attilapiros ! |
…ching ### What changes were proposed in this pull request? Fixes a bug where if `spark.shuffle.service.fetch.rdd.enabled=true`, memory-only cached blocks will fail to unpersist. ### Why are the changes needed? In #33020, when all RDD blocks are removed from `externalShuffleServiceBlockStatus`, the underlying Map is nulled to reduce memory. When persisting blocks we check if it's using disk before adding it to `externalShuffleServiceBlockStatus`, but when removing them there is no check, so a memory-only cache block will keep `externalShuffleServiceBlockStatus` null, and when unpersisting it throw an NPE because it tries to remove from the null Map. This adds checks to the removal as well to only remove if the block is on disk, and therefore should have been added to `externalShuffleServiceBlockStatus` in the first place. ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? New and updated UT Closes#35959 from Kimahriman/fetch-rdd-memory-only-unpersist. Authored-by: Adam Binford <adamq43@gmail.com> Signed-off-by: Sean Owen <srowen@gmail.com>
…ching ### What changes were proposed in this pull request? Fixes a bug where if `spark.shuffle.service.fetch.rdd.enabled=true`, memory-only cached blocks will fail to unpersist. ### Why are the changes needed? In #33020, when all RDD blocks are removed from `externalShuffleServiceBlockStatus`, the underlying Map is nulled to reduce memory. When persisting blocks we check if it's using disk before adding it to `externalShuffleServiceBlockStatus`, but when removing them there is no check, so a memory-only cache block will keep `externalShuffleServiceBlockStatus` null, and when unpersisting it throw an NPE because it tries to remove from the null Map. This adds checks to the removal as well to only remove if the block is on disk, and therefore should have been added to `externalShuffleServiceBlockStatus` in the first place. ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? New and updated UT Closes#35959 from Kimahriman/fetch-rdd-memory-only-unpersist. Authored-by: Adam Binford <adamq43@gmail.com> Signed-off-by: Sean Owen <srowen@gmail.com> (cherry picked from commit e0939f0) Signed-off-by: Sean Owen <srowen@gmail.com>
…ching ### What changes were proposed in this pull request? Fixes a bug where if `spark.shuffle.service.fetch.rdd.enabled=true`, memory-only cached blocks will fail to unpersist. ### Why are the changes needed? In apache#33020, when all RDD blocks are removed from `externalShuffleServiceBlockStatus`, the underlying Map is nulled to reduce memory. When persisting blocks we check if it's using disk before adding it to `externalShuffleServiceBlockStatus`, but when removing them there is no check, so a memory-only cache block will keep `externalShuffleServiceBlockStatus` null, and when unpersisting it throw an NPE because it tries to remove from the null Map. This adds checks to the removal as well to only remove if the block is on disk, and therefore should have been added to `externalShuffleServiceBlockStatus` in the first place. ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? New and updated UT Closesapache#35959 from Kimahriman/fetch-rdd-memory-only-unpersist. Authored-by: Adam Binford <adamq43@gmail.com> Signed-off-by: Sean Owen <srowen@gmail.com> (cherry picked from commit e0939f0) Signed-off-by: Sean Owen <srowen@gmail.com>
What changes were proposed in this pull request?
Wrapping
JHashMap[BlockId, BlockStatus](used inblockStatusByShuffleService) into a new classBlockStatusPerBlockIdwhich removes the reference to the map when all the persisted blocks are removed.Why are the changes needed?
With #32790 a bug is introduced when all the persisted blocks are removed we remove the HashMap which already shared by the block manger infos but when new block is persisted this map is needed to be used again for storing the data (and this HashMap must be the same which shared by the block manger infos created for registered block managers running on the same host where the external shuffle service is).
Does this PR introduce any user-facing change?
No.
How was this patch tested?
Extending
BlockManagerInfoSuitewith test which removes all the persisted blocks then adds another one.