-
Notifications
You must be signed in to change notification settings - Fork 140
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
fix jdc sigterm signalling issue #1321
base: main
Are you sure you want to change the base?
fix jdc sigterm signalling issue #1321
Conversation
Bencher Report
Click to view all benchmark results
|
Bencher Report
Click to view all benchmark results
|
Bencher Report
Click to view all benchmark results
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1321 +/- ##
==========================================
- Coverage 19.14% 19.11% -0.04%
==========================================
Files 166 166
Lines 10987 11047 +60
==========================================
+ Hits 2104 2112 +8
- Misses 8883 8935 +52
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
3aa0262
to
6bb7eb0
Compare
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.
Please explain in the commit what is the ACTUAL fix. What are you doing in order to fix the issue.
6bb7eb0
to
65512c1
Compare
65512c1
to
a3efa46
Compare
tACK I found a typo, but overall LGTM |
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.
Looking good overall. Added a few nits.
Regarding this commit 6a95deb could you please explain why it is added? the title says "move task_status block inside the select macro" but it is not clear why the task_status
was moved. maybe add that in the commit body.
a0ffe75 could have a better title, maybe "Fix typo", or you could just fix it up to the second commit(a3efa46).
a0ffe75
to
0352e78
Compare
@jbesraa I have incorporated your suggestions and updated the commit history to a single commit since the changes are closely related. |
0352e78
to
a9fb6f4
Compare
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.
We tested this locally and it seems that the ghost processes are gone! so this is good to go
It changes the structuring of the start method, to avoid its blocking nature in case of disconnection from the upstream. Currently, when we are sending the termination signal, during the stance of disconnection from upstream, due of blocking nature of initialize_jd it halts the main thread runtime from executing select block, which listens for any termination signal and channel responses. -Modifications 1. Addition of new shutdown field, which can be used later in integration test to terminate the instances 2. Change argument type for methods initialize_jd and initialize_jd_solo, to make them movable. 3. Spawning of blocking process as a separate task
0e02c9f
to
b1e6780
Compare
closes: #1266
Description
This PR introduces several key changes to the
JobDeclaratorClient
implementation to enhance its functionality, improve shutdown handling, and resolve blocking issues during task execution:Use of
tokio::spawn
for Task Initializationinitialize_jd
andinitialize_jd_as_solo_miner
methods are now executed usingtokio::spawn
.Refactored Method Signatures
initialize_jd
andinitialize_jd_as_solo_miner
to acceptProxyConfig
as a parameter instead of relying on&self
.self
from being moved into the spawned tasks and allows for proper cloning and reuse within the async context.Graceful Shutdown Mechanism
tokio::sync::Notify
instance as part ofJobDeclaratorClient
struct to handle shutdown signals. Which now gives power to struct initializer to shutdown process directly.ctrl_c
signal handling with a task that listens for the signal and triggers the shutdown notifier.Simplified Interrupt Signal Handling
ctrl_c
interrupt futures within the select loop.