Skip to content

Conversation

sanrise
Copy link
Contributor

@sanrise sanrise commented Oct 7, 2025

Summary:
We may be too flexible when it comes to init'ing the IPCConfigClient if one is not found. As we have observed in prod it can cause some unknown behaviors.

So let's step back and on first principals make the flow more strict.

We always expect DaemonConfigLoader.registerFactory() to be called before any config loader thread starts, this is by design and should happen in the main thread. There on, every config_loader update thread should attempt at reading the config (if available) if the configClient exists, if it doesn't exist there is already good error handling and logging that we should leverage.

The worst thing that can happen here is one iteration of the background thread for reading config will miss a profiling config and log the error, that's far more better than debugging race conditions

Differential Revision: D84078972

Summary:
We may be too flexible when it comes to init'ing the IPCConfigClient if one is not found. As we have observed in prod it can cause some unknown behaviors.

So let's step back and on first principals make the flow more strict.

We always expect DaemonConfigLoader.registerFactory() to be called before any config loader thread starts, this is by design and should happen in the main thread. There on, every config_loader update thread should attempt at reading the config (if available) if the configClient exists, if it doesn't exist there is already good error handling and logging that we should leverage.

The worst thing that can happen here is one iteration of the background thread for reading config will miss a profiling config and log the error, that's far more better than debugging race conditions

Differential Revision: D84078972
@meta-cla meta-cla bot added the cla signed label Oct 7, 2025
Copy link

meta-codesync bot commented Oct 7, 2025

@sanrise has exported this pull request. If you are a Meta employee, you can view the originating Diff in D84078972.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant