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.