Skip to content

Book IDs are not safe with concurrency #16

@LM-Wolfert

Description

@LM-Wolfert

The book creation process is not atomic, it first gets the new ID and then creates the book. Multiple processes could get the same ID which could lead to wrong data or data loss.

The proposed solution is to create a database table for books with a sub-table for pages. Creating a book can be done in a single operation returning the ID from an auto-increment.

What is required for this to work:

  • Migration of current book structure.
  • Updating the current code logic to implement this new structure.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions