fix race condition with merge and persist and sink adding