Skip to content

Conversation

@jlledom
Copy link
Contributor

@jlledom jlledom commented Oct 14, 2025

Just to make some tests. Ignore for now

Issue
THREESCALE-11940

@jlledom jlledom self-assigned this Oct 14, 2025

def start_to_fetch_jobs
Async(transient: true) { @job_fetcher.start(@jobs) }
Async { @job_fetcher.start(@jobs) }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Transient means what? That this block is detached from it's immediate parent? Or AI was lying to me?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://socketry.github.io/async/guides/tasks/index.html#reactor-lifecycle

This was an idea to investigate the CrashLoopBack the client is having. This is the hypotetical scenario to test:

  1. Some error happens somewhere, that leads the worker to shutdown.
  2. The Job fetcher task is still working on the background, but the main task won't wait for it because is transient.
  3. As part of the shutdown, at some point the logger is closed.
  4. Then the job fetcher task fails. That makes it try to log, and we see the errors about the log being closed

So if we don't mark the task as transient, the main task will wait for it and we hopefully will see any error logged.

This is just an hypothesis and proving it would require creating an image and instruct the client to run it. So I'm trying other approaches for now. See my comments in the issue.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're saying that a transient task will not block process exit?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it would block the process to exit, the docs say the transient task is forcefully stopped then the reactor it belongs to finishes. But I don't know, maybe at some point the transient task is still running when it shouldn't. Just speculating, as the Jira issue is damn complicated.

Copy link
Contributor Author

@jlledom jlledom Oct 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another scenario: The process_all method could fail or exit so fast that the fetch still haven't started to fetch, if that happens, the worker would start a shutdown and the fetcher wouldn't prevent it because it's transient.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants