GC.writePack does not enable PackWriter searchForReuseTimeout and ObjectDirectory does not short-circuit alternate scans on timeout
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 3/5
- Tempo estimado
- Meio dia
- Facilidade para iniciantes
- 64/100
Direção de pesquisa
Start in GC.writePack, where the PackWriter is created, and check whether enableSearchForReuseTimeout() is called before repacking. Then read ObjectDirectory.selectObjectRepresentation, where the loop over myAlternates() runs after the local pack loop; add an early return when packer.checkSearchForReuseTimeout() is true. Done when GC.repack() honours pack.searchForReuseTimeout and a unit test shows alternates are skipped after the timeout trips. The author's proposed branch fix/gc-search-for-reuse-timeout can be compared against.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Version
JGit 6.10.x / 7.x (master)
Operating System
Linux (x86_64)
Bug description
PackConfig supports pack.searchForReuseTimeout (DEFAULT_SEARCH_FOR_REUSE_TIMEOUT), and PackWriter enforces that timeout inside searchForReuse when enableSearchForReuseTimeout() has been called on the PackWriter instance.
However:
GC.writePackcreates aPackWriterto repack a repository (allornonHeads), where delta-base/object-representation reuse searches across many loose objects and non-bitmap packs are common, but never callspw.enableSearchForReuseTimeout(). As a result,pack.searchForReuseTimeouthas no effect duringGC.repack().- In
ObjectDirectory.selectObjectRepresentation(PackWriter, ProgressMonitor, Iterable<ObjectToPack>), after iterating local packs (for (Pack p : packList.packs)), the method unconditionally recurses into everyAlternateHandle(for (AlternateHandle h : myAlternates())) even whenpacker.checkSearchForReuseTimeout()has already tripped.
Actual behavior
- During
GC.repack(),PackWriter.searchForReuseignorespack.searchForReuseTimeoutbecausesearchForReuseTimeoutEnabledremainsfalse. On repositories with thousands of non-bitmap packfiles or alternates,Finding sourcesduring background GC can run for hours without bounding the reuse search phase. - When
searchForReuseTimeouttrips while scanning local packs,ObjectDirectory.selectObjectRepresentationstill enters every alternate object database and starts another pack scan loop before noticing the timeout.
Expected behavior
GC.writePackcallspw.enableSearchForReuseTimeout()sopack.searchForReuseTimeoutis respected duringGC.repack().ObjectDirectory.selectObjectRepresentationchecksif (packer.checkSearchForReuseTimeout()) { return; }before traversingmyAlternates().
Relevant log output
Finding sources: 14% (284120/2029428) [stalled in ObjectDirectory.selectObjectRepresentation across packList and alternates during GC.writePack]
Other information
Proposed fix and unit test (Commit: 6b55b1c): https://github.com/trukhinyuri/jgit/commit/6b55b1c8d9433a11530767692178f17cee4654c0 (branch fix/gc-search-for-reuse-timeout).
- Linguagem predominante
- Java
- Estrelas
- 427
- Forks
- 116
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de eclipse-jgit/jgit
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 83/100
eclipse-jgit/jgit#329 ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 77/100
eclipse-jgit/jgit#327 ·
-
Repository.create(boolean bare) should provide a no-arg overload that uses isBare()Talvez livre de novo @hardikyadav12 assumiu há 77 dias e não há nenhum pull request aberto. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 74/100
eclipse-jgit/jgit#297 · 1 comentário ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 83/100
eclipse-jgit/jgit#293 · 2 comentários ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
eclipse-jgit/jgit#288 ·
Todas as issues de eclipse-jgit/jgit
Issues semelhantes
-
? - Needs Triage bot_watch bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
NVIDIA/cudf-spark-jni#5594 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 92/100
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
Mantenedores costumam responder em até 1 dia
-
bug
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 88/100
Mantenedores costumam responder em até 1 dia
-
Upgrade solr to 9.11.0Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
DataONEorg/dataone-indexer#390 ·