[ 
https://issues.apache.org/jira/browse/YARN-11400?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17899630#comment-17899630
 ] 

ASF GitHub Bot commented on YARN-11400:
---------------------------------------

pxp531 commented on code in PR #5238:
URL: https://github.com/apache/hadoop/pull/5238#discussion_r1849417696


##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/NodeStatusUpdaterImpl.java:
##########
@@ -717,6 +717,8 @@ public void removeOrTrackCompletedContainersFromContext(
         
org.apache.hadoop.yarn.server.nodemanager.containermanager.container.ContainerState.DONE))
 {
         context.getContainers().remove(containerId);
         removedContainers.add(containerId);
+        // For the finished containers, the residual data stored in leveldb 
should also be cleared
+        addCompletedContainer(containerId);

Review Comment:
   > Thanks for the explanation, but it's not needed for this operation, it 
doesn't seem like what heartbeat is supposed to do, 
`NodeStatusUpdaterImpl#addCompletedContainer` already does it, I think it's 
enough
   
   When restarting the NM, we encountered an OOM issue during the recovery 
process. Upon analyzing the cause of the OOM in the heap memory, we found a 
large number of completed containers, approximately 150,000+. 
   
   We suspect this is due to improper deletion of data in levelDB. Therefore, 
we believe that in addition to the memory deletion, the heartbeat response 
should also include a deletion operation for levelDB. 
   
   Currently, the heartbeat response only performs memory deletion and does not 
handle levelDB deletion, which may lead to inconsistencies between the two 
deletion processes. Furthermore, the levelDB deletion in the heartbeat response 
is asynchronous, where the delete tasks are simply added to a pending deletion 
cache, so it does not affect the success of the heartbeat response.
   
![image](https://github.com/user-attachments/assets/e4e64aa7-e6cf-49b4-9e20-c6a387ce0a1c)
   





> The finished container data stored in state store by NodeManager should be 
> cleared in the NodeManager heartbeat response
> ------------------------------------------------------------------------------------------------------------------------
>
>                 Key: YARN-11400
>                 URL: https://issues.apache.org/jira/browse/YARN-11400
>             Project: Hadoop YARN
>          Issue Type: Improvement
>            Reporter: Daniel Ma
>            Priority: Minor
>              Labels: pull-request-available
>
> The finished container data stored in state store by NodeManager should be 
> cleared in the NodeManager heartbeat response in case of too much residual 
> data stored in leveldb remains.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org

Reply via email to