db based leadership election