feat: Add async feature store interface and in-memory implementation#457
Merged
Conversation
jsonbailey
marked this pull request as ready for review
July 10, 2026 22:40
joker23
approved these changes
Jul 13, 2026
keelerm84
approved these changes
Jul 15, 2026
Adds the async interfaces (AsyncFeatureStore, AsyncReadOnlyStore, AsyncDataSourceUpdateSink, AsyncBigSegmentStore, AsyncInitializer, AsyncSynchronizer), the AsyncInMemoryFeatureStore, and async test utilities. Stacked on the async support classes slice.
jsonbailey
force-pushed
the
jb/sdk-60/async-feature-store
branch
from
July 16, 2026 16:28
bbe77d7 to
9709ea1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
BEGIN_COMMIT_OVERRIDE
chore: Add async feature store interface and in-memory implementation
END_COMMIT_OVERRIDE
Tracked internally: SDK-2671
What
The async data-store foundation the async SDK builds on.
interfaces.py— async interfaces:AsyncFeatureStore,AsyncReadOnlyStore(asyncget/all; the async analog ofReadOnlyStore),AsyncDataSourceUpdateSink,AsyncBigSegmentStore,AsyncInitializer,AsyncSynchronizer. Pure additions alongside the existing sync interfaces.async_feature_store.py—AsyncInMemoryFeatureStore. Holds no lock: every method reads/mutates its dict without awaiting in between, so it runs to completion without the event loop switching coroutines (the sync twin needs aReadWriteLockbecause threads can preempt each other).testing/— async test utilities:mock_async_components.py,async_feature_store_test_base.py, andtest_async_in_memory_feature_store.py.Why
Foundation for the async Python SDK (epic SDK-60). Subsequent slices (async evaluator, big segments, data sources, data systems, client) depend on these interfaces and the in-memory store.
Validation
uv run pytest ldclient/testing/test_async_in_memory_feature_store.py— 17 passeduv run mypy ldclient— cleanEpic SDK-60.
Note
Low Risk
Additive experimental APIs and in-memory store with no changes to existing sync behavior; risk is mainly API churn before production readiness.
Overview
Adds the async data-store foundation for the experimental async Python SDK: new async counterparts to the sync flag-data plumbing, plus a default in-memory implementation and shared tests.
interfaces.pygains async APIs alongside existing sync types:AsyncReadOnlyStore,AsyncFeatureStore(versionedinit/upsert/delete,upsertreturns whether an update applied),AsyncDataSourceUpdateSink,AsyncBigSegmentStore, and FDv2-styleAsyncInitializer/AsyncSynchronizer(asyncfetchand async-generatorsync). All are marked experimental.async_feature_store.pyintroducesAsyncInMemoryFeatureStore, mirroring sync in-memory versioning and tombstone delete semantics but without aReadWriteLock—methods do not await between reads/writes, so dict updates run atomically on the event loop.testing/addsAsyncFeatureStoreTestBase(async port of the sync store contract tests),MockAsyncFeatureStore/MockAsyncEventProcessor/MockAsyncUpdateProcessor, andtest_async_in_memory_feature_store.pywiring the in-memory store through that suite.Reviewed by Cursor Bugbot for commit 9966c03. Bugbot is set up for automated code reviews on this repo. Configure here.