-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-3941][CORE] _remainingmem should not increase twice when updateBlockInfo #2792
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SPARK-3941][CORE] _remainingmem should not increase twice when updateBlockInfo #2792
Conversation
|
Test FAILed. |
|
Jenkins, retest this please. |
|
QA tests have started for PR 2792 at commit
|
|
QA tests have finished for PR 2792 at commit
|
|
Test PASSed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The old code seems a little more concise
|
Hey @liyezhang556520 I believe your fix is correct. However, if we put it in the |
|
Good idea, I'll update it soon. |
|
@andrewor14 , code updated, would you please have a look? |
|
QA tests have started for PR 2792 at commit
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like a change in semantics. Can you explain why the old code is incorrect (is it)? I'm just trying to understand what this block is trying to do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"memSize" is the current memory that the block consume, "originalMemSize" is the memory used before block updating. These two size might be not the same. So here, if the block exists on the slave already, _remainingmem should first _remainingMem += originalMemSize and then _remainingMem -= memSize if the new storage level is "useMemory". Do I have misunderstanding of these two mem size?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, we want to release the originalMemSize and occupy the new memSize. That makes sense. It seems that the old code is just wrong in some cases then.
|
LGTM. I'm merging this. |
|
QA tests have finished for PR 2792 at commit
|
|
Test PASSed. |
In BlockManagermasterActor, _remainingMem would increase memSize for twice when updateBlockInfo if new storageLevel is invalid and old storageLevel is "useMemory". Also, _remainingMem should increase with original memory size instead of new memSize.