What is wrong here, we need a fix?
For a page 'navigation' and 'sitemap' we have metadata on the page for re-scheduling. The first (direct) publish succeed and it re-schedules (handled by the event system method) The scheduled new job starts as expected but fails with
SqlExceptionHelper - Violation of PRIMARY KEY constraint 'PK_EXECUTION_ID'. Cannot insert duplicate key in object 'dbo.EXECUTION'. The duplicate key value is (tcm:0-4543761-66560).
It succeeds in publishing but not in deployment, (also the event system is not accessed this time).
2021-11-22 15:25:20,374 DEBUG [ProcessingAkkaSpringContext-akka.actor.default-dispatcher-124] HybridStateStore - Creating new execution entity for execution id: tcm:0-4543761-66560
2021-11-22 15:25:20,374 DEBUG [ProcessingAkkaSpringContext-akka.actor.default-dispatcher-123] HybridStateStore - Creating new execution entity for execution id: tcm:0-4543761-66560
2021-11-22 15:25:20,374 ERROR [ProcessingAkkaSpringContext-akka.actor.default-dispatcher-124] SqlExceptionHelper - Violation of PRIMARY KEY constraint 'PK_EXECUTION_ID'. Cannot insert duplicate key in object 'dbo.EXECUTION'. The duplicate key value is (tcm:0-4543761-66560).
2021-11-22 15:25:20,374 ERROR [ProcessingAkkaSpringContext-akka.actor.default-dispatcher-124] ExceptionMapperStandardImpl - HHH000346: Error during managed flush [org.hibernate.exception.ConstraintViolationException: could not execute statement]
2021-11-22 15:25:20,374 DEBUG [ProcessingAkkaSpringContext-akka.actor.default-dispatcher-125] HybridStateStore - Creating new pipeline entity for execution id: tcm:0-4543761-66560 and pipeline id: Tridion-Bootstrap
2021-11-22 15:25:20,389 DEBUG [ProcessingAkkaSpringContext-akka.actor.default-dispatcher-129] HybridStateStore - Creating new step entity for execution id: tcm:0-4543761-66560, pipeline id: Tridion-Bootstrap and step id: TridionUnzipStep
2021-11-22 15:25:20,405 DEBUG [ProcessingAkkaSpringContext-akka.actor.default-dispatcher-129] HybridStateStore - Found step entity for execution id: tcm:0-4543761-66560, pipeline id: Tridion-Bootstrap and step id: TridionUnzipStep
2021-11-22 15:25:20,421 DEBUG [ProcessingAkkaSpringContext-akka.actor.default-dispatcher-130] HybridStateStore - Found pipeline entity for execution id: tcm:0-4543761-66560 and pipeline id: Tridion-Bootstrap
2021-11-22 15:25:20,421 DEBUG [ProcessingAkkaSpringContext-akka.actor.default-dispatcher-132] HybridStateStore - Creating new pipeline entity for execution id: tcm:0-4543761-66560 and pipeline id: Tridion-Wait
2021-11-22 15:25:20,436 DEBUG [ProcessingAkkaSpringContext-akka.actor.default-dispatcher-133] HybridStateStore - Creating new step entity for execution id: tcm:0-4543761-66560, pipeline id: Tridion-Wait and step id: TridionWaitStep
2021-11-22 15:25:20,436 DEBUG [ProcessingAkkaSpringContext-akka.actor.default-dispatcher-133] HybridStateStore - Found step entity for execution id: tcm:0-4543761-66560, pipeline id: Tridion-Wait and step id: TridionWaitStep
2021-11-22 15:25:20,452 DEBUG [ProcessingAkkaSpringContext-akka.actor.default-dispatcher-122] HybridStateStore - Found pipeline entity for execution id: tcm:0-4543761-66560 and pipeline id: Tridion-Wait
2021-11-22 15:25:20,452 DEBUG [ProcessingAkkaSpringContext-akka.actor.default-dispatcher-124] HybridStateStore - Creating new pipeline entity for execution id: tcm:0-4543761-66560 and pipeline id: Tridion-Cleanup
2021-11-22 15:25:20,467 DEBUG [ProcessingAkkaSpringContext-akka.actor.default-dispatcher-126] HybridStateStore - Creating new step entity for execution id: tcm:0-4543761-66560, pipeline id: Tridion-Cleanup and step id: TridionCleanupStep
2021-11-22 15:25:20,467 DEBUG [ProcessingAkkaSpringContext-akka.actor.default-dispatcher-126] HybridStateStore - Found step entity for execution id: tcm:0-4543761-66560, pipeline id: Tridion-Cleanup and step id: TridionCleanupStep
2021-11-22 15:25:20,483 DEBUG [ProcessingAkkaSpringContext-akka.actor.default-dispatcher-128] HybridStateStore - Found pipeline entity for execution id: tcm:0-4543761-66560 and pipeline id: Tridion-Cleanup
2021-11-22 15:25:20,483 DEBUG [ProcessingAkkaSpringContext-akka.actor.default-dispatcher-125] HybridStateStore - Found execution entity for execution id: tcm:0-4543761-66560