How to deal with UNIQUE violation detected

recently i met "UNIQUE violation detected "error message many times, anybody know which action will trigger this ?

We recently found a similar problem, in our case the issue was associated to service registration in Kong Control Plane.

error="2 errors occurred:
while processing event: {Create} upstream SERVICE.8080.svc 
failed: HTTP status 409 (message: "UNIQUE violation detected on '{name="SERVICE.8080.svc"}'")

According to the error message the kubernetes-ingress-controller was not able to register the SERVICE into Kong Control Plane as the SERVICE already existed hence the message: UNIQUE violation detected.

We tried removing the SERVICE from Kong Control Plane > Services but you can also attempt to wipe the corresponding WORKSPACE so the ingress controller recreate all the things as it is possible that the rest of the services may be experiencing the same problem.

We also suspect this a problem specific to Kong version 2.X not sure if fixed on version 3.X or above.