Skip to content
This repository has been archived by the owner on May 30, 2024. It is now read-only.

ensure the default config does not share the featureStore #130

Merged
merged 1 commit into from
Nov 15, 2018
Merged

ensure the default config does not share the featureStore #130

merged 1 commit into from
Nov 15, 2018

Conversation

seanparmelee
Copy link

Hello,

We tried upgrading to v5.6.1 (from 3.4.0) of the client today and ran into an issue with retrieving all of our features. Our app retrieves features from 4 different LD projects and we were noticing that only the features from a single project were coming back. Debugging into this, the root cause is that all 4 of our LD client instances are using the same featureStore object. If we adjust the configuration object to create a new InMemoryFeatureStore each time defaults are applied, as I've done in this PR, the issue goes away.

If these changes are desirable, another possible solution would be to export InMemoryFeatureStore just like RedisFeatureStore so consumers that need to use multiple clients can do something like this:

let ldClient = LaunchDarkly.init(sdkKey, {
    featureStore: LaunchDarkly.InMemoryFeatureStore()
});

Happy to adjust this PR as needed. Thanks!

Note: sounds like this may be related to #127

@eli-darkly
Copy link
Contributor

eli-darkly commented Nov 15, 2018

I'm pretty sure it's not related to #127 in any way (because in that scenario they're just calling identify(), which sends user data without interacting with the feature store at all), but you're right about this bug. Thanks. I think this problem started in v5.0.0 when we brought together various pieces of configuration validation into one place.

@eli-darkly eli-darkly merged commit 0e734d9 into launchdarkly:master Nov 15, 2018
@seanparmelee seanparmelee deleted the separate-feature-store branch November 15, 2018 21:47
@seanparmelee
Copy link
Author

Thanks @eli-darkly!

@eli-darkly
Copy link
Contributor

Version 5.6.2 has now been released with this fix.

eli-darkly added a commit that referenced this pull request Apr 2, 2019
stringify built-in user attributes in events, and secondary key for evals
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants