Skip to content

The LFS maintenance scripts after orphaned objects removal do not update repo.LFSSize after operations. #36169

@DmitryFrolovTri

Description

@DmitryFrolovTri

Feature Description

Scenarios:

  • Administrator runs garbage collect on LFS and some orphaned files removed - the size on the disk changes
  • Administrator runs lfs doctor and some inconsistencies get fixed - the size on the disk changes
  • Administrator removed files himself on back-end / reconfigured LFS - the size on the disk changes

Now:

  1. gc-lfs doctor command (services/doctor/lfs.go:16-51):
    • Removes orphaned LFS meta objects from the database via GarbageCollectLFSMetaObjects()
    • Checks storage for consistency
    • BUT does NOT update repo.LFSSize
  2. storage-lfs doctor command (services/doctor/storage.go:114-132):
    • Only checks for orphaned files in storage
    • Deletes orphaned files if autofix is enabled
    • Also does NOT update repo.LFSSize

Should be:

  1. gc-lfs doctor command (services/doctor/lfs.go:16-51):
    • does what it normally does AND
    • updates repo.LFSSize 2. storage-lfs doctor command (services/doctor/storage.go:114-132):
    • does what it normally does AND
    • updates repo.LFSSize

Screenshots

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/bugtype/proposalThe new feature has not been accepted yet but needs to be discussed first.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions