Skip to content

fix: prevent concurrent community sighting data loss - #2

Merged
theworker02 merged 2 commits into
mainfrom
fix/community-sighting-write-race
Aug 20, 2026
Merged

theworker02 merged 2 commits into
mainfrom
fix/community-sighting-write-race

Conversation

@theworker02

Copy link
Copy Markdown
Collaborator

Fixes #1.

Serializes CommunitySightingStore.create() writes through a per-store promise queue so concurrent requests cannot overwrite one another's read-modify-write state. The queue is kept usable after a failed write.

Adds a regression test that performs 32 concurrent creates and verifies that every report and ID is preserved.

@theworker02
theworker02 merged commit d0de96a into main Aug 20, 2026
1 check 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.

Race condition in CommunitySightingStore.create() can silently drop reports

1 participant