Added alerting for locked queries