Got feedback or spotted a mistake?

Leave a comment at the end of this page or email contact@krishagni.com

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

The error “Duplicate entry ABC for key OS_POS_ST_CONTS_OSPID_UQ” is raised when 2 or more threads are in a race condition attempting to occupy the same container slot. When 2 or more threads ask the question - “Give me the next free slot available in the container X?” at about the same time, all of them get the same answer. It is P1. One of the thread succeeds in using the slot P1. The other threads end up on losing side and spit the unique constraint error.

Use cases:

  1. When the user submits the same page/form twice either from the same tab or different tabs in quick successions

  2. When 2 or more users use the same container at about the same time.

Solution:

  1. Review none of the container slots are occupied by the other specimens

  2. Wait for some time and resubmit the form.

  • No labels