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

Runtime created objects don't get synced #10012

Open
yhabteab opened this issue Feb 29, 2024 · 0 comments · May be fixed by #10013
Open

Runtime created objects don't get synced #10012

yhabteab opened this issue Feb 29, 2024 · 0 comments · May be fixed by #10013
Assignees
Labels
area/distributed Distributed monitoring (master, satellites, clients) area/runtime Downtimes, comments, dependencies, events bug Something isn't working
Milestone

Comments

@yhabteab
Copy link
Member

Describe the bug

008fcd1 changed the creation process for runtime objects and retains their config in a temporary file. After the object has been successfully created and activated, the temporary file is moved to the actual config file (which is known by the config compiler), otherwise it is simply discarded. However, since the object activation triggers an OnActiveChanged event, it tries to sync the configuration with the other endpoint. Doing this works well if the endpoints are connecting after the object has been created, but not if they are already connected. This is because when sending the config update, it is going to access the configuration file of the recently created object, but as its config is still in the temporary file, it won't find it, thus it won't be able to sync it.

std::ifstream fp(ConfigObjectUtility::GetExistingObjectConfigPath(object).CStr(), std::ifstream::binary);
if (!fp)
return;

@yhabteab yhabteab added bug Something isn't working area/distributed Distributed monitoring (master, satellites, clients) area/runtime Downtimes, comments, dependencies, events labels Feb 29, 2024
@yhabteab yhabteab added this to the 2.15.0 milestone Feb 29, 2024
@yhabteab yhabteab self-assigned this Feb 29, 2024
@yhabteab yhabteab linked a pull request Mar 1, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/distributed Distributed monitoring (master, satellites, clients) area/runtime Downtimes, comments, dependencies, events bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant