Skip to content
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

Dfdaemon should leave task when dfget stop daemon with aliveTime. #1388

Open
gaius-qi opened this issue Jun 15, 2022 · 4 comments
Open

Dfdaemon should leave task when dfget stop daemon with aliveTime. #1388

gaius-qi opened this issue Jun 15, 2022 · 4 comments
Assignees
Milestone

Comments

@gaius-qi
Copy link
Member

Feature request:

  • Dfdaemon should leave task when dfget stop daemon with aliveTime.

https://github.com/dragonflyoss/Dragonfly2/blob/main/client/config/peerhost.go#L51

Use case:

UI Example:

@gaius-qi gaius-qi added this to the v2.0.4 milestone Jun 15, 2022
@gaius-qi gaius-qi self-assigned this Jun 15, 2022
@gaius-qi
Copy link
Member Author

Do you want to slove this issue? @greenhandatsjtu

@greenhandatsjtu
Copy link
Contributor

Do you want to slove this issue? @greenhandatsjtu

Hi @gaius-qi , I would like to work on this issue! But I'm not sure what 'leave task' means?
Also, I'll appreciate it if you could give me some instructions on how to implement it. Thanks.

@gaius-qi
Copy link
Member Author

If the dfget daemon service is shutdown, it will actively call GRPC LeaveTask to notify the scheduler to release all the tasks that have been downloaded by the daemon, because this dfget daemon no longer provides services for other peers to download these tasks.

However, when only dfget is used, a daemon will be pulled up to survive for a period of time according to the AliveTime parameter. When the AliveTime is reached, daemon will be shutdown, but the GRPC LeaveTask is not called to notify the Scheduler to release the completed Task.

@greenhandatsjtu
Copy link
Contributor

If the dfget daemon service is shutdown, it will actively call GRPC LeaveTask to notify the scheduler to release all the tasks that have been downloaded by the daemon, because this dfget daemon no longer provides services for other peers to download these tasks.

However, when only dfget is used, a daemon will be pulled up to survive for a period of time according to the AliveTime parameter. When the AliveTime is reached, daemon will be shutdown, but the GRPC LeaveTask is not called to notify the Scheduler to release the completed Task.

Thanks for your instructions! I think I understand now, can you assign this issue to me? I'll try to fix it.

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

No branches or pull requests

2 participants