GC.writePack does not enable PackWriter searchForReuseTimeout and ObjectDirectory does not short-circuit alternate scans on timeout
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- Mezza giornata
- Idoneità per principianti
- 64/100
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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).
- Lingua principale
- Java
- Stelle
- 427
- Fork
- 116
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di eclipse-jgit/jgit
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
eclipse-jgit/jgit#329 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
eclipse-jgit/jgit#327 ·
-
Repository.create(boolean bare) should provide a no-arg overload that uses isBare()Forse di nuovo libera @hardikyadav12 l’ha presa 77 giorni fa e non c’è nessuna pull request aperta. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
eclipse-jgit/jgit#297 · 1 commento ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
eclipse-jgit/jgit#293 · 2 commenti ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
eclipse-jgit/jgit#288 ·
Tutte le issue di eclipse-jgit/jgit
Issue simili
-
? - Needs Triage bot_watch bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
NVIDIA/cudf-spark-jni#5594 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno
-
Upgrade solr to 9.11.0Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
DataONEorg/dataone-indexer#390 ·