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

オープン
#321 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
67/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
git, java
領域
backend, databases

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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

主要言語
Java
スター
427
フォーク
116
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

eclipse-jgit/jgit のほかの issue

eclipse-jgit/jgit の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。