Skip to content

Fix concurrent feature memoization#1012

Open
jnunemaker wants to merge 1 commit into
mainfrom
fix-concurrent-memoization
Open

Fix concurrent feature memoization#1012
jnunemaker wants to merge 1 commit into
mainfrom
fix-concurrent-memoization

Conversation

@jnunemaker

Copy link
Copy Markdown
Collaborator

DSL feature lookup now memoizes through a thread-safe map, so shared Flipper instances return one Feature object per feature even when multiple threads populate the cache at once. This replaces non-atomic Hash mutation with Concurrent::Map#compute_if_absent while preserving existing key normalization and feature construction behavior. Covered by a new concurrent DSL spec.

Tested with bundle exec rspec spec/flipper/dsl_spec.rb and git diff --check.


Compound Engineering
GPT_5

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