Skip to content

Commit 1d9a24f

Browse files
aaronenyeshifacebook-github-bot
authored andcommitted
Reset config state on remote Configs (#554)
Summary: Pull Request resolved: #554 On demand configs will have options that need to be set from scratch. the Config has logic to set default options etc. We need to reset the entire state so on-demand configs get parsed correctly. This was causing a bug where if PROFILE_START_TIME is not present, instead of setting default, the 2nd Config onwards would get stale start times. Reviewed By: chaekit Differential Revision: D34661638 fbshipit-source-id: 767adf92120a72b11d90ede2a2f22cf2796e555e
1 parent d0330b1 commit 1d9a24f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

libkineto/src/ConfigLoader.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,7 @@ void ConfigLoader::updateConfigThread() {
277277
onDemandConfig = config_->clone();
278278
configureFromSignal(now, *onDemandConfig);
279279
} else if (now > next_on_demand_load_time) {
280+
onDemandConfig = std::make_unique<Config>();
280281
configureFromDaemon(now, *onDemandConfig);
281282
next_on_demand_load_time = now + onDemandConfigUpdateIntervalSecs_;
282283
}

0 commit comments

Comments
 (0)