Skip to content

Conversation

@gaius-qi
Copy link
Member

Description

This pull request updates the type of the uploading_count field from i64 to u64 in several structs within dragonfly-client-storage/src/metadata.rs. This change ensures that upload counts, which should never be negative, are now represented as unsigned integers.

Type consistency and correctness:

  • Changed the uploading_count field from i64 to u64 in the Task struct to prevent negative upload counts.
  • Changed the uploading_count field from i64 to u64 in the CacheTask struct for the same reason.
  • Changed the (deprecated) uploading_count field from i64 to u64 in the Piece struct.

Related Issue

Motivation and Context

Screenshots (if appropriate)

Signed-off-by: Gaius <gaius.qi@gmail.com>
@gaius-qi gaius-qi added this to the v2.4.0 milestone Dec 15, 2025
@gaius-qi gaius-qi self-assigned this Dec 15, 2025
@gaius-qi gaius-qi added the enhancement New feature or request label Dec 15, 2025
@codecov
Copy link

codecov bot commented Dec 15, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 48.16%. Comparing base (1ef9f88) to head (0f306f6).
⚠️ Report is 17 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1526      +/-   ##
==========================================
+ Coverage   48.12%   48.16%   +0.03%     
==========================================
  Files          70       70              
  Lines       17987    17987              
==========================================
+ Hits         8657     8664       +7     
+ Misses       9330     9323       -7     
Files with missing lines Coverage Δ
dragonfly-client-storage/src/metadata.rs 56.94% <ø> (ø)

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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

@chlins chlins enabled auto-merge (squash) December 15, 2025 06:15
Copy link
Member

@fcgxz2003 fcgxz2003 left a comment

Choose a reason for hiding this comment

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

LGTM

@chlins chlins merged commit 3f13615 into main Dec 15, 2025
9 of 12 checks passed
@chlins chlins deleted the feature/type branch December 15, 2025 06:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants