Keep JSONRPC output backpressure outside configuration and deduplication locks
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 35/100
- Issue-Typ
- Refactoring
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- rust
- Bereich
- api, backend, performance, testing
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.
- Vorherrschende Sprache
- Rust
- Sterne
- 207
- Forks
- 45
- Ø Merge
- 3 T. 12 Std.
- Gemergte PRs (30 T.)
- 11
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus microsoft/python-environment-tools
-
enhancement
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 35/100
-
debt
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 25/100
microsoft/python-environment-tools#538 · 1 Kommentar ·
-
enhancement
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 35/100
-
enhancement
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 35/100
microsoft/python-environment-tools#533 · 2 Kommentare ·
-
debt
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 35/100
microsoft/python-environment-tools#534 · 1 Kommentar ·
Alle Issues in microsoft/python-environment-tools
Ähnliche Issues
-
bug github_actions
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
registrystack/registry-stack#1393 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
longbridge/gpui-kit#3223 ·
-
bug engine
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
rocky-data/rocky#2181 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
oasisprotocol/oasis-sdk#2523 ·
-
[indexer] [QA] Add a focused test for the new NonRetryableError / assertSocketAlive() behavior. Offenbot:ai-assisted component:indexer QA-roadmap status:untriaged
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
midnightntwrk/midnight-indexer#1557 ·