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

Abierto
#321 1 comentario 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
67/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
git, java

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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

Lenguaje dominante
Java
Estrellas
427
Forks
116
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de eclipse-jgit/jgit

Todos los issues de eclipse-jgit/jgit

Issues similares

Más issues de Java

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.