Maintenance tick parses each outstanding cleanup journal more than once

Aperta
#2,034 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
50/100
Tipo di issue
Refactoring
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
javascript
Ambito
performance

Direzione di ricerca

Start by reading src/core/cache/purge-cleanup.js around line 180 and the maintenance paths in src/core/cache/maintenance.js cited in the issue. Trace how walkForRetired, sweepEvictedCacheCleanups, and the report path call readCacheCleanup, then identify how to measure calls within one tick. Done means a tick with several outstanding journals reads each at most once and the full suite passes.

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

Descrizione

Source: #2027 at 24be140b6ba1c9371564af4a1645bf85550e29ec
Location: src/core/cache/purge-cleanup.js:180; src/core/cache/maintenance.js:330 vs :445, :663, :2675, :2692
Severity: low

Evidence

sweepEvictedCacheCleanups re-reads and re-parses journals walkForRetired already parsed in the same tick, and readCacheCleanup is also called per partition in the report path. Confirmed at head 24be140b. Bounded by outstanding journals, which is zero in steady state; roughly 2 extra syscalls plus one JSON.parse per outstanding journal per tick.

Why deferral is safe

Efficiency only, with no incorrect behavior: the duplicate work is proportional to outstanding cleanups, not partitions or uptime, and threading a visited-id set out of a void-returning recursive walk is a wider change than the fix warranted.

Acceptance condition

One maintenance tick parses each outstanding journal at most once (for example a per-tick journal cache), demonstrated by counting readCacheCleanup calls in a tick with several outstanding journals, with the full suite green.

Review preference; backlog only. A human may explicitly delegate it with neutral:fix.

Lingua principale
JavaScript
Stelle
11
Fork
0
Merge medio
2h 25m
PR unite (30g)
311

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

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 hyparam/hypaware

Tutte le issue di hyparam/hypaware

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.