Skip to content

Conversation

@julio-lopez
Copy link
Collaborator

No description provided.

In kopia, "blob" is a generic term to refer to either
an object in an object storage provider, or a file
in a file system storage provider. There are various
types of blobs in a kopia repository.

In kopia, "pack" is used to refer to specific types
of blobs, namely 'p' & 'q' pack blobs, that store
"content" data, as opposed to say, "index" blobs.

This change attempts to use the term "pack" consistently
in the functions and types used for pack deletion.

Note that the corresponding task names, shown below, remain
unchanged since these names are used in the persistent
maintenance run metadata, and that is used to make decisions
about the safety of the execution of those tasks.

```
	TaskDeleteOrphanedBlobsQuick     = "quick-delete-blobs"
	TaskDeleteOrphanedBlobsFull      = "full-delete-blobs"
```
@julio-lopez julio-lopez requested a review from Copilot November 6, 2025 19:51
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors maintenance statistics handling by replacing manual mutex-protected counters with the thread-safe stats.CountSum type, and corrects terminology and spelling issues throughout the maintenance code.

Key changes:

  • Replaces mutex-protected counter variables with stats.CountSum for thread-safe statistics tracking
  • Corrects spelling and grammar in comments and error messages
  • Updates terminology from "blob" to "pack" for consistency

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
repo/maintenancestats/stats_rewrite_contents.go Fixes spelling errors in comments and improves grammar in summary message
repo/maintenance/maintenance_run.go Updates terminology from "blob" to "pack" in log messages and error descriptions for consistency
repo/maintenance/content_rewrite.go Refactors statistics tracking to use stats.CountSum instead of mutex-protected variables, and updates failedCount to use atomic.Uint64

@codecov
Copy link

codecov bot commented Nov 6, 2025

Codecov Report

❌ Patch coverage is 80.00000% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.06%. Comparing base (cb455c6) to head (471fbd6).
⚠️ Report is 740 commits behind head on master.

Files with missing lines Patch % Lines
repo/maintenance/content_rewrite.go 80.00% 3 Missing ⚠️
repo/maintenance/maintenance_run.go 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4963      +/-   ##
==========================================
+ Coverage   75.86%   78.06%   +2.19%     
==========================================
  Files         470      547      +77     
  Lines       37301    31407    -5894     
==========================================
- Hits        28299    24518    -3781     
+ Misses       7071     4844    -2227     
- Partials     1931     2045     +114     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@julio-lopez julio-lopez marked this pull request as ready for review November 6, 2025 20:09
@julio-lopez julio-lopez merged commit 499aec5 into kopia:master Nov 7, 2025
27 checks passed
@julio-lopez julio-lopez deleted the refactor/count-sum branch November 7, 2025 05:34
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.

1 participant