fix integration bugs for PartitionManager
update backup master and primary listener for sending heartbeat periodically