handling replica commit