-
Notifications
You must be signed in to change notification settings - Fork 201
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
experiments: add state cleanup for deleted experiments #2611
Conversation
artiq/dashboard/experiments.py
Outdated
if expurl in self.open_experiments: | ||
self.open_experiments[expurl].close() |
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.
Why would you delete the state of an experiment if it's open?
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.
And this code is likely never called? See:
def restore_state(self, state):
if self.open_experiments:
raise NotImplementedError
...
The logic of this seems broken at several levels. Experiments open outside the repos are never cleared. The fact that the cleanup only happens in Limiting the size of the relevant dictionaries by removing out old entries when a certain size is reached (see https://www.google.com/search?q=python+lru+dict) sounds simpler and more robust. |
fdc4273
to
8fdaaca
Compare
8fdaaca
to
16280d2
Compare
Signed-off-by: Florian Agbuya <[email protected]>
16280d2
to
4c27518
Compare
ARTIQ Pull Request
Description of Changes
Implement Least Recently Used (LRU) based management for experiment state cleanup. Use dictionary size limit of 100 as default (can be modified).
NOTE: Requires merging #2590 first.
Related Issue
Closes #2576
Type of Changes
Steps (Choose relevant, delete irrelevant before submitting)
All Pull Requests
git commit --signoff
, see copyright).Code Changes
Git Logistics
git rebase --interactive
). Merge/squash/fixup commits that just fix or amend previous commits. Remove unintended changes & cleanup. See tutorial.git show
). Format:Licensing
See copyright & licensing for more info.
ARTIQ files that do not contain a license header are copyrighted by M-Labs Limited and are licensed under LGPLv3+.