YARN-5168 the patch added RMNodeImpl.updatedExistContainers, but it didn't remove completed containers.
These objects (ContainerStatusPBImpl & ContainerIdPBImpl ) stay in RMNodeImpl.updatedExistContainers forever.
Because of this leak, ResourceManager in our production environment encountered OOM issue. We found 13 million ContainerStatusPBImpl objects in the heap dump file of ResourceManager.
The patch has been applied in our production env and so far it works well.