is this possible that container info disappear from node update?
Yes it is definitely possible since we've seen it in practice. If the application is tearing down the RM will tell the NM to clean up the application. There are scenarios where the NM can fail to report a completed container for an application that is being cleaned up, since it's removing all the app state and the containers that go with it. Since the app is cleaning up, there's no AM around to ack. And if the NM never reports a completion event for a container then RMNodeImpl clearly leaks in the launchedContainers map without this patch.
The patch also covers the corner case where the NM failed to record state for a container somehow (I/O error or other state store failure) and reconnected with partial state. In that scenario the RM will properly detect that the container is no longer being tracked by the NM and report the completion to the application (as well as preventing the leak in launchedContainers).