PRIMARY_FLAG column in the table HZ_CONTACT_POINTS is being set for multiple rows belonging to same party in HZ_PARTIES when created concurrently using different database sessions via the seeded API HZ_CONTACT_POINT_V2PUB.create_contact_point. As per the document (https://docs.oracle.com/cd/E18727-01/doc.121/e13662/T358453T358461.htm), the primary_flag for the record created earlier should be reset.
This is working correctly when it is being used in one session. But while using parallel from the two different session at the same time, it is creating multiple same type contact point having primary flag as ‘Y’ in both.
As the system is used by huge number users parallel hence we can not implement lock or trigger as it is impacting the performance. Need some good solution so that we can prevent it from creating multiple same type primary contact considering the system performance not impacted.