Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle duplicate event inserts gracefully when using Postgresql #258

Conversation

Robban1980
Copy link
Contributor

Pull Request type

  • Bugfix

NOTE: Please remember to run ./gradlew spotlessApply to fix any format violations.

Changes in this PR

This PR changed the behavior of the PostgresExecutionDAO insertEventExecution method to handle the insertion of duplicate event entries gracefully. This allows the proper application flow to continue.

Without this fix is not applied when exceptions will be thrown similar to this

com.netflix.conductor.core.exception.NonTransientException: Unable to add event execution 3e3ed625-d8a1-4e03-841c-4291b9da64f5_0
81496848 [event-queue-poll-scheduler-thread-1] ERROR com.netflix.conductor.core.events.DefaultEventProcessor [] - Error handling message: 3e3ed625-d8a1-4e03-841c-4291b9da64f5 on queue:_callbackFinalizeQueue

The number of exceptions will grow as the source queue_message table is not cleared of the of the bad entries because of the exception thrown when they are processed.

The new behavior matches that of the RedisExecutionDAO that skips adding events that have already been added.

Issue #

@v1r3n v1r3n merged commit 2b910de into conductor-oss:main Sep 13, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants