Add retry_on_conflict to upsert to fix conflict bugs in double-save scen...

...arios.