The race has highlighted divisions within local Democratic politics in the famously liberal city.