-
Notifications
You must be signed in to change notification settings - Fork 95
Avoid spurious logging on restart with waiting parentless tasks. #7051
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
| self.active_tasks[itask.point][itask.identity] = itask | ||
| self.active_tasks_changed = True | ||
| LOG.debug(f"[{itask}] added to the n=0 window") | ||
| LOG.info(f"[{itask}] added to the n=0 window") |
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.
Deliberate change - it's important for users to know when tasks enter the n=0 window (otherwise it only gets logged as INFO at the first state change).
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.
I don't see why this is useful info to have in the logs
| id_ = flow( | ||
| { | ||
| 'scheduling': { | ||
| 'graph': { | ||
| 'R1': 'a', | ||
| }, | ||
| }, | ||
| } | ||
| ) |
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.
Can make this shorter
| id_ = flow( | |
| { | |
| 'scheduling': { | |
| 'graph': { | |
| 'R1': 'a', | |
| }, | |
| }, | |
| } | |
| ) | |
| id_ = flow('a') |
| self.active_tasks[itask.point][itask.identity] = itask | ||
| self.active_tasks_changed = True | ||
| LOG.debug(f"[{itask}] added to the n=0 window") | ||
| LOG.info(f"[{itask}] added to the n=0 window") |
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.
I don't see why this is useful info to have in the logs
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.
To me it looks like the problem is that we keep calling pool.release_runahead_tasks() every time we load a single task from the DB instead of just calling it at the end of loading all tasks.
Had a go at this here (unavoidable refactoring): https://github.com/cylc/cylc-flow/compare/master...MetRonnie:runahead-release?expand=1
Close #7037
If auto-spawned parentless tasks are present at shutdown, on restart they will be resurrected from the DB; and auto-spawned to the runahead limit again - because we don't record whether or not parentless tasks were spawned already.
This double-spawning is prevented (by luck - [see footnote]) by the imperfect bodge that stops suicided tasks from being resurrected by other dependencies - which has no functional effect, but it results in misleading log messages.
Said imperfect bodge was fixed by re-implementing suicide triggers as expire triggers (#6835) - but for now that's experimental.
Solution implemented here:
[footnote] - if the double-spawning had not been prevented by the bodge I think the new instance would just replace the old in the task pool, which would actually be fine because the task had not done anything yet (however, better not to do it).
Check List
CONTRIBUTING.mdand added my name as a Code Contributor.setup.cfg(andconda-environment.ymlif present).?.?.xbranch.