Skip to content

fix: Prevent data race and duplicate enqueues in SyncPipeline (apn-cgmih)#294

Merged
paulvanbrenk merged 1 commit intomainfrom
merge/apn-hws5bk
Feb 16, 2026
Merged

fix: Prevent data race and duplicate enqueues in SyncPipeline (apn-cgmih)#294
paulvanbrenk merged 1 commit intomainfrom
merge/apn-hws5bk

Conversation

@paulvanbrenk
Copy link
Collaborator

Summary

  • Moves stale-releases DB query before SyncPackageAsync to prevent race with consumer thread that may modify package data concurrently
  • Adds HashSet deduplication to prevent same package ID from being enqueued to the summary channel twice

Test plan

  • All 392 tests pass (dotnet test PatchNotes.slnx)
  • Clean rebase onto current main

MR: apn-hws5bk | Bead: apn-cgmih | Worker: slit

Move the stale-releases DB query before SyncPackageAsync so it executes
while the consumer cannot yet be modifying this package's data. Add a
HashSet to prevent the same package ID from being enqueued to the channel
more than once.

Fixes: apn-cgmih

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@paulvanbrenk paulvanbrenk merged commit 884dafa into main Feb 16, 2026
4 checks passed
@paulvanbrenk paulvanbrenk deleted the merge/apn-hws5bk branch February 16, 2026 16:16
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.

1 participant

Comments