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

fix: when the task has started and did not download the data, gc is failed #915

Merged
merged 1 commit into from
Dec 25, 2024

Conversation

gaius-qi
Copy link
Member

Description

This pull request includes updates to the garbage collection logic in the dragonfly-client project. The changes improve the handling of tasks based on their download status and content length.

Key updates to garbage collection logic:

  • Enhanced logic to handle tasks with different download statuses, ensuring that tasks with finished downloads and valid content lengths have their space correctly evicted.
  • Added conditions to skip tasks without content length unless the task has failed, in which case it logs the failure and assigns an evicted space of 0.

Related Issue

Motivation and Context

Screenshots (if appropriate)

@gaius-qi gaius-qi added the enhancement New feature or request label Dec 25, 2024
@gaius-qi gaius-qi added this to the v1.0.0 milestone Dec 25, 2024
@gaius-qi gaius-qi self-assigned this Dec 25, 2024
@gaius-qi gaius-qi requested a review from a team as a code owner December 25, 2024 13:23
Copy link
Member

@chlins chlins left a comment

Choose a reason for hiding this comment

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

lgtm

@gaius-qi gaius-qi changed the title fix: if the task has started and did not download the data, gc is failed fix: when the task has started and did not download the data, gc is failed Dec 25, 2024
@gaius-qi gaius-qi added bug Something isn't working dependencies Pull requests that update a dependency file and removed dependencies Pull requests that update a dependency file labels Dec 25, 2024
Copy link

codecov bot commented Dec 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 34.85%. Comparing base (41a1b34) to head (a32da2f).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #915   +/-   ##
=======================================
  Coverage   34.85%   34.85%           
=======================================
  Files          60       60           
  Lines        9239     9239           
=======================================
  Hits         3220     3220           
  Misses       6019     6019           
Files with missing lines Coverage Δ
dragonfly-client/src/gc/mod.rs 0.00% <ø> (ø)

Copy link
Contributor

@CormickKneey CormickKneey left a comment

Choose a reason for hiding this comment

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

lgtm

@CormickKneey CormickKneey merged commit 59df0b9 into main Dec 25, 2024
6 checks passed
@CormickKneey CormickKneey deleted the feature/no-content-length branch December 25, 2024 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants