avoid concurrency conflicts when merging records