-
Notifications
You must be signed in to change notification settings - Fork 95
resolvers: catch object leak #6985
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
base: 8.6.x
Are you sure you want to change the base?
Conversation
| if sub_id in self.delta_processing_flows: | ||
| del self.delta_processing_flows[sub_id] |
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.
@dwsutherland, do you know if it makes sense to delete the entry here or should be cleared elsewhere in the code?
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.
@dwsutherland, any ideas on how this dict was intended to be housekept?
|
(Dumped the profiler script used to detect this leak into #7046) |
wxtim
left a comment
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.
- Superficially reasonable
- Appears to work
- Does not break anything as far as I can tell
Fix a memory leak found in the resolver code.
cylc.flow.network.resolvers.BaseResolvers.delta_processing_flowsis added to for each subscription. However, it seems never to be removed from.There is the
BaseResolvers.flow_delta_processedmethod (called from the UIS side) which housekeeps things within each entry. I'm not sure if this was intended to remove the entry for each subscription too. But I'm also not sure if this method would get called in the event of an exception, namelyGeneratorExit.Reproducible Example
Before (objects not cleaned up):
After (objects cleaned up):
Check List
CONTRIBUTING.mdand added my name as a Code Contributor.setup.cfg(andconda-environment.ymlif present).?.?.xbranch.