|
There should be no harm or double notification because they both call setMyLastDurableOpTimeForward which will only update and report progress if the optime is newer.
void ReplicationCoordinatorImpl::setMyLastDurableOpTimeForward(const OpTime& opTime) {
|
stdx::unique_lock<stdx::mutex> lock(_mutex);
|
if (opTime > _getMyLastDurableOpTime_inlock()) {
|
_setMyLastDurableOpTime_inlock(opTime, false);
|
_reportUpstream_inlock(std::move(lock));
|
}
|
}
|
If we did want to only call once we can remove the call from the applyBatchFinalizer, since it only applies to secondaries whereas the callback happens at the storage engine level for all nodes.
Maybe we are seeing something else going on? Like the apply/durable optime being update sep. (which is expected) but in quick succession – or there is some other issue sending progress like with the timer.
|