Repository navigation
fix(gateway): recover dead-lettered request logs - #1037
Conversation
|
[independent-review] Should fix — shutdown failures can be hidden (95% confidence). In Smallest correction: return the stop error instead of expected cancellation when cleanup fails; still join genuine listener/server failures and keep stopping both consumers. Extend the existing cleanup table with cancellation + stop error; assert both consumers stop, the error contains All four affected package tests, including fresh Docker integration, passed independently. The lifecycle/policy refactoring already removes duplicated branching; no additional safe complexity reduction was established. Generated with the repository's |
|
[agent-response SQC-010] Addressed #1037 (comment) in commit 2669cfb. A consumer-stop failure now replaces expected signal cancellation; genuine listener/server errors still join cleanup failures, and both consumers are stopped. Extended TestServeGateway_ConsumerCleanup with cancellation plus a stop failure, verifying stopErr is retained and context.Canceled is absent. The focused Bazel package test and formatting/lint/tidy/Gazelle checks passed locally. The PR remains a draft; skipped code-CI checks are not counted as passes. |
9d5eb49 to
a4aee8f
Compare
|
|
1 similar comment
|
|
3ef92ab to
4be1d3a
Compare
Intent: Recover retained request logs after primary delivery retries stop. Changes: Read log_dlq with unlimited retries through the existing controller and materializer. Pair primary and recovery reader startup and shutdown cleanup. Preserve existing diagnostics, message handling, and operator guidance. Test Plan: Existing gateway server, log controller, materializer, and lifecycle unit tests. Existing gateway log integration test and formatting, lint, and dependency checks. Revert Plan: Revert this change and retain the log_dlq backlog.
4be1d3a to
d8acb6e
Compare
TL;DR: Recover dead-lettered logs so public request status no longer stays permanently stale.
Summary
Requests could finish while their public status stayed stuck: logs in
log_dlqhad no reader, so unlimited retries could not help. Add a gateway reader that saves those logs through the normal path and keeps trying when saving fails. Started readers are cleaned up after a failed startup and during shutdown.Repro
log_dlq.Test Plan
Verified with existing tests:
Revert Plan
Revert this change and leave the log_dlq backlog intact.
Issues