Fix concurrent JSON read-modify-write race (2 gunicorn workers, no lock) #13
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Severity: high
Category: data-integrity
Location:
app.py:198-200, Dockerfile:29Problem
With
--workers 2, two concurrent POSTs both load, modify, and write the same file — last write wins and silently discards the other.Suggested fix
Drop to
--workers 1(fine for a single household) or usefcntl.flock/filelockaround load+save.Filed by automated code review.