Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Block calls to get config until DB load completes #7975

Merged
merged 3 commits into from
Apr 27, 2021
Merged

Conversation

karenyz
Copy link
Contributor

@karenyz karenyz commented Apr 27, 2021

_configLoadFromDBSemaphore = dispatch_semaphore_create(1) causes the later dispatch_semaphore_wait call in checkAndWaitForInitialDatabaseLoad() to never be blocked, so it's possible to return a config before we finish loading from the DB.

Removing dispatch_semaphore_signal from loadPersonalization as its success/failure should not impact RC returning a config

fixes #7424

@google-oss-bot
Copy link

google-oss-bot commented Apr 27, 2021

Coverage Report

Affected SDKs

  • FirebaseRemoteConfig-iOS-FirebaseRemoteConfig.framework

    SDK overall coverage changed from 80.66% (f889a83) to 80.75% (188d2dc) by +0.08%.

    Filename Base (f889a83) Head (188d2dc) Diff
    RCNConfigContent.m 80.34% 81.57% +1.23%

Test Logs

Copy link
Member

@paulb777 paulb777 left a comment

Choose a reason for hiding this comment

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

Is this also a fix for #7648?

@karenyz karenyz requested a review from danasilver April 27, 2021 20:23
@karenyz karenyz merged commit be2729a into master Apr 27, 2021
@karenyz karenyz deleted the kz-rc-empty-config branch April 27, 2021 21:26
@firebase firebase locked and limited conversation to collaborators May 28, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Remote Config] Local conf randomly empty even with successful fetch
5 participants