added primary detection and list of servers that can be compacted