Skip to content

fix: custom featureStores in FDv2 does not get wrapped as TransactionalFeatureStore.#1812

Merged
joker23 merged 1 commit into
mainfrom
skz/sdk-2733/custom-persistent-store-init
Jul 21, 2026
Merged

fix: custom featureStores in FDv2 does not get wrapped as TransactionalFeatureStore.#1812
joker23 merged 1 commit into
mainfrom
skz/sdk-2733/custom-persistent-store-init

Conversation

@joker23

@joker23 joker23 commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Note

Medium Risk
Changes core feature-store wiring for FDv2 data system configs; incorrect wrapping could affect flag payload consistency for custom persistent stores.

Overview
FDv2 dataSystem.persistentStore handling now always returns an LDTransactionalFeatureStore. FDv1-only stores (e.g. Redis/Dynamo integrations without applyChanges) are wrapped in TransactionalFeatureStore so FDv2 updates no longer throw applyChanges is not a function. Stores that already expose applyChanges are returned unchanged so native transactional behavior is preserved. The same logic applies when the store is provided as a factory.

TransactionalFeatureStore forwards getSelector and getInitMetaData from its in-memory layer so selector/init metadata stay correct before and after a basis, without surfacing metadata written only on the underlying persistence store pre-basis.

Tests cover Configuration wrapping/pass-through and transactional metadata/selector behavior.

Reviewed by Cursor Bugbot for commit 2125f36. Bugbot is set up for automated code reviews on this repo. Configure here.

@github-actions

github-actions Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

@launchdarkly/js-sdk-common size report
This is the brotli compressed size of the ESM build.
Compressed size: 26360 bytes
Compressed size limit: 29000
Uncompressed size: 129188 bytes

@github-actions

github-actions Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

@launchdarkly/js-client-sdk size report
This is the brotli compressed size of the ESM build.
Compressed size: 32030 bytes
Compressed size limit: 34000
Uncompressed size: 114438 bytes

@github-actions

github-actions Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

@launchdarkly/browser size report
This is the brotli compressed size of the ESM build.
Compressed size: 179649 bytes
Compressed size limit: 200000
Uncompressed size: 831617 bytes

@github-actions

Copy link
Copy Markdown
Contributor

@launchdarkly/js-client-sdk-common size report
This is the brotli compressed size of the ESM build.
Compressed size: 38887 bytes
Compressed size limit: 39000
Uncompressed size: 212703 bytes

@joker23
joker23 force-pushed the skz/sdk-2733/custom-persistent-store-init branch from 2310f09 to 2125f36 Compare July 21, 2026 14:05
@joker23
joker23 marked this pull request as ready for review July 21, 2026 14:42
@joker23
joker23 requested a review from a team as a code owner July 21, 2026 14:42

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

@joker23
joker23 merged commit c687a97 into main Jul 21, 2026
55 checks passed
@joker23
joker23 deleted the skz/sdk-2733/custom-persistent-store-init branch July 21, 2026 15:18
@github-actions github-actions Bot mentioned this pull request Jul 21, 2026
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.

2 participants