When removing the content under /var/discovery/impl, the org.apache.sling.discovery.impl bundle will be deactivated.
Looking at the code, the org.apache.sling.discovery.impl.common.heartbeat.HeartbeatHandler does deactivate the bundle when it detects two instances using the same sling.id in the same topology. This mechanism was implemented in
When removing the content under /var/discovery/impl, the code will detect this as a having two instances with the same id and thus disable the bundle.
Those two cases, should be differentiated.