Hacktoberfest 2026 : les issues que les mainteneurs ont marquées pour octobre, ouvertes et accessibles aux débutants. Parcourir les issues Hacktoberfest

Keep JSONRPC output backpressure outside configuration and deduplication locks

Ouverte
#540 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Évaluation

Difficulté
5/5
Temps estimé
Plus d'une semaine
Accessibilité débutants
35/100
Type d'issue
Refactorisation
Clarté
Plutôt claire
Activité
Active
Stack technique
rust

Piste de recherche

Start by reading crates/pet-reporter/src/cache.rs, crates/pet/src/jsonrpc.rs, and crates/pet-jsonrpc/src/lib.rs, then review the transport seams from #529/#532 and generation semantics from #536. Validate the design with controlled slow-consumer tests; done means bounded output buffering, correct generation and ordering behavior, explicit failures, and coverage for saturation, closed output, and shutdown.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

debt

Tracking plan: #528
Priority: P2. Evidence: lock scopes confirmed by source inspection; reproduce impact with controlled slow-consumer tests.

Problem

The deduplicating reporter invokes its downstream reporter while holding the manager/environment map write lock. The generation-guarded reporter holds the configuration read lock through notification reporting. The downstream JSONRPC writer synchronously writes/flushes stdout.

A slow or disconnected consumer can therefore couple transport I/O to discovery deduplication and configuration publication. The audit does not claim a measured production deadlock; the first task is to prove the coupling and required ordering with deterministic tests.

Sources: deduplicating reporter, generation reporter, framed output.

Scope

Separate deduplication and generation decisions from blocking output. Evaluate a bounded single-writer queue or equivalent narrow transport boundary; do not replace lock contention with an unbounded memory queue. Define exactly where generation checks occur and how notification/reply ordering is guaranteed when configure races with queued output.

Make serialization/write/flush failures explicit and preserve stdout as framed protocol output only. Rename CacheReporter around deduplication if the type is changed, and retain only the data its behavior needs.

Acceptance criteria

  • A controllably blocked output sink cannot hold the configuration or deduplication locks for the duration of the write.
  • Tests cover slow consumers, closed output, queue saturation, and shutdown with pending notifications.
  • Stale-generation notifications are suppressed at the documented publication boundary, including configure racing with queued output.
  • Environment/manager deduplication remains atomic; a refresh reply cannot overtake the notifications it is defined to complete.
  • Concurrent replies/notifications remain correctly framed, with bounded buffering and explicit error propagation.
  • #531/#533 show no regression in complete-inventory correctness, first-result latency, or resource bounds.

Dependencies

Depends on #536 for generation/snapshot semantics and #533 for slow-consumer/resource validation. Build on the transport seams from #529/#532. Coordinate with bounded scheduling #539 rather than introducing a second conflicting queue policy. The complete sequence is in #528.

Langage dominant
Rust
Étoiles
207
Forks
45
Merge moyen
3 j 6 h
PR mergées (30 j)
12

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de microsoft/python-environment-tools

Toutes les issues de microsoft/python-environment-tools

Issues similaires

Plus d'issues Rust

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.