Replace commit_on_success_unless_managed by atomic