Skip to content

Repository._delete needs a random read access just for the deleted size #6521

@ThomasWaldmann

Description

@ThomasWaldmann

Code: https://github.com/borgbackup/borg/blob/1.2.0/src/borg/repository.py#L1241

Used by:

  • repo.put(existing_id, new_data)
  • repo.delete(existing_id)

To update the Repository.compact map for the affected segment, the code needs to call LoggedIO.read(segment, offset, existing_id, read_data=False) just to get the size back.

If we had the size information in the repo index (and not just segment and offset), we could save that random read.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions