Skip to content

Race condition in PSQL Order ID Assignment #28

@Joshua-Beha

Description

@Joshua-Beha

Using JMeter to drive simulated traffic a race condition was found in the Order ID assignment. The way the server was designed each server thread reads the current order number to use out of the database, check it's not null, then write the next order number to be used in a new transaction back into the same field in the database. In the meantime other threads could read the order number out of the database in the time between initial read and write causing them to attempt to create orders with duplicate numbers.

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