collectSiblingGarbage's --no-expose-gc reset is not try/caught, unlike the guard's own handle resolution

Aperta Adatta ai principianti
#2,214 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à
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
68/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
javascript, node.js
Ambito
testing

Direzione di ricerca

Leggi test/core/query-sql-budget.test.js intorno alla riga 171 e confronta la gestione del reset con src/core/query/sql.js:183-185. Controlla il precedente esistente lato test in test/core/observability-runtime-metrics.test.js:282, quindi esegui i test del budget. Il lavoro è terminato quando uno stub di v8.setFlagsFromString che genera un’eccezione fa sì che la raccolta venga saltata senza che collectSiblingGarbage generi un’eccezione.

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

Descrizione

Source: #2199 at 54a0f1b96340fde3dabc1fd3f0af9581a20ff7e8
Location: test/core/query-sql-budget.test.js:171
Severity: nit

Evidence

The helper's finally calls v8.setFlagsFromString('--no-expose-gc') bare; the production guard hardens the identical reset at src/core/query/sql.js:183-185 with a comment explaining a finally is outside the sibling catch's reach, and test/core/query-sql-forced-gc-flag.test.js exists to prove it. On a runtime whose setFlagsFromString throws (a hardened embedding or node:v8 shim), the helper throws out of the finally and both budget tests fail with a confusing error instead of skipping collection.

Why deferral is safe

Test-only code with no observed failure on the repo's Node 22; it matches the existing test-side precedent at test/core/observability-runtime-metrics.test.js:282, and the helper's JSDoc claim remains accurate for the path that is caught. Hardening it is outside a message-accuracy PR.

Acceptance condition

Wrap the reset in try/catch mirroring sql.js:183-185; verify by stubbing v8.setFlagsFromString to throw and observing test/core/query-sql-budget.test.js still completes (collection skipped) instead of erroring out of collectSiblingGarbage.

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

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

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.