MESOS-9384 attempted to make the master to garbage-collect disconnected resource providers. However, if there are disconnected resource providers but none of the connected ones changes, the following code snippet would make the master ignore the agent update and skip the garbage collection:
The condition to ignore the agent update will be triggered in one of the following conditions:
1. The resource provider has no resource, so the agent's total resource remains the same.
2. When the agent restarts and reregisters, its resource provider resources will be reset.
As a result, the master will still keep records for the disconnected resource providers and report them.