GC.getStatistics() reports the .midx file size instead of the covered pack files

Aperta
#321 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
67/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
git, java
Ambito
backend, databases

Direzione di ricerca

Start by tracing GC.getStatistics() and the pack-file discovery it uses when a multi-pack-index is present; reproduce with a repository containing multiple .pack files and a .midx. Compare the reported size and count with the actual pack files, then check the same statistics before and after writing the multi-pack-index. Done means both values reflect the real pack files.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Version

7.7.1

Operating System

Linux/Unix

Bug description

With a repository whose objects are stored in multiple pack files covered by a multi-pack-index, GC.getStatistics() returns wrong values for sizeOfPackedObjects and numberOfPackFiles.

To reproduce, enable the multi-pack-index on such a repository, then get the statistics via GarbageCollectCommand or directly:

GC.RepoStatistics stats = new GC(repo).getStatistics();
Actual behavior

stats.sizeOfPackedObjects is close to the size of the objects/pack/multi-pack-index.midx file instead of the total size of the .pack files, and stats.numberOfPackFiles counts all the packs covered by the midx as 1.

For a repository with about 300 MB of pack files covered by a midx, sizeOfPackedObjects is reported as ~7 MB — roughly the size of the .midx file itself. The same statistics were correct before a midx was written for the repository.

Expected behavior

sizeOfPackedObjects should be the sum of the .pack file sizes and numberOfPackFiles the number of real pack files, matching the statistics of the same repository without a multi-pack-index.

Relevant log output

Other information

No response

Lingua principale
Java
Stelle
427
Fork
116
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di eclipse-jgit/jgit

Tutte le issue di eclipse-jgit/jgit

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.