-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Prevent stale configuration data after iOS device restore #15442
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
Conversation
|
/gemini review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request effectively resolves two race conditions in the Remote Config initialization process. The first fix correctly addresses a logical race condition by ensuring database setup completes before its state is read, using a blocking wait on the database operation queue. The second fix eliminates a data race on the gIsNewDatabase global flag by synchronizing all read and write access through a dedicated serial dispatch queue. The changes are well-implemented and include clear comments explaining the reasoning. I have one minor suggestion for code conciseness.
This PR addresses the critical issue where Remote Config would fail to fetch new data and get stuck on default values after an iOS device was restored from a backup. It implements a two-part solution: