xuanyuanking opened a new pull request #27418: [SPARK-30594][CORE] Do not post 
SparkListenerBlockUpdated when updateBlockInfo returns false
URL: https://github.com/apache/spark/pull/27418
 
 
   All credit to @Ngone51, Closes #27306.
   
   ### What changes were proposed in this pull request?
   If `updateBlockInfo` returns false, which means the `BlockManager` will 
re-register and report all blocks later. So, we may report two times for the 
same block, which causes `AppStatusListener` to count used memory for two 
times, too. As a result, the used memory can exceed the total memory.
   So, this PR changes it to not post `SparkListenerBlockUpdated` when 
`updateBlockInfo` returns false. And, always clean up used memory whenever 
`AppStatusListener` receives `SparkListenerBlockManagerAdded`.
   
   ### Why are the changes needed?
   This PR tries to fix negative memory usage in UI 
(https://user-images.githubusercontent.com/3488126/72131225-95e37e00-33b6-11ea-8708-6e5ed328d1ca.png,
 see #27144 ). Though, I'm not very sure this is the root cause for #27144 
since known information is limited here.
   
   ### Does this PR introduce any user-facing change?
   No.
   
   ### How was this patch tested?
   Add new UT.
   

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to