Skip to content

Race condition on PostgreSQL when assigning first sequence number to 'TransactionOutboxEntry' #1067

Description

@gregoire-rouillon

Hello,

The way DefaultPersistor#setNextSequence handles race condition to assign a first sequence number does not work with PostgreSQL. The same connection is re-used for a recursive call when an indexViolation has been detected. This is not allowed by PostgreSQL and will lead to the following error :

ERROR:  current transaction is aborted, commands ignored until end of transaction block

As a result, scheduling two executions at the same time (on the same topic) could fail for one execution.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions