Skip to content

[codex] Fix atomic sync gates#1020

Open
jnunemaker wants to merge 1 commit into
mainfrom
atomic-sync-gates
Open

[codex] Fix atomic sync gates#1020
jnunemaker wants to merge 1 commit into
mainfrom
atomic-sync-gates

Conversation

@jnunemaker

Copy link
Copy Markdown
Collaborator

Fixes thundering-herd syncs caused by unsynchronized check-then-act gates in the poll and interval synchronizers. The poll adapter now coordinates in-flight local updates, retries after failed synchronization, and resets sync state after forks; the interval synchronizer now claims each elapsed interval atomically. This keeps concurrent request threads from issuing duplicate remote reads and overlapping local writes for the same sync window. Validated with bundle exec rspec spec/flipper/adapters/poll_spec.rb spec/flipper/adapters/sync/interval_synchronizer_spec.rb and bundle exec rspec spec/flipper/adapters, which passed with the existing 2 sqlite pending examples.

@jnunemaker jnunemaker marked this pull request as ready for review July 8, 2026 18:42
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