The mapping has unique constraint and creating a mapping with the same
local entity will fail. Creation of mapping with the same local entity
might happen because of race condition, that would happen if 2 processes
start mapping of the same local entity at the same time.
Return the existing public_id if creation failed due to duplicate.
Reviewed: https:/ /review. openstack. org/343027 /git.openstack. org/cgit/ openstack/ keystone/ commit/ ?id=29624d47e31 6d2e63f464b2d25 043ec7598afa05
Committed: https:/
Submitter: Jenkins
Branch: master
commit 29624d47e316d2e 63f464b2d25043e c7598afa05
Author: Boris Bobrov <email address hidden>
Date: Fri Jul 15 21:29:47 2016 +0300
Prevent error when duplicate mapping is created
The mapping has unique constraint and creating a mapping with the same
local entity will fail. Creation of mapping with the same local entity
might happen because of race condition, that would happen if 2 processes
start mapping of the same local entity at the same time.
Return the existing public_id if creation failed due to duplicate.
Change-Id: Ic6e6ec9614e16a 49c791dc6c06a44 64d18be09be
Related-Bug: 1582585