Repository navigation
fix(submitqueue): replay persisted terminal request logs - #1039
Draft
sbalabanov wants to merge 1 commit into
Draft
sbalabanov wants to merge 1 commit into
sbalabanov wants to merge 1 commit into
Conversation
Summary: Persist the terminal timestamp, error, and metadata in the winning request snapshot. Retry matching terminal outcomes without another transition or provider call, and prevent incomplete legacy repairs from erasing known diagnostics. Reproduction: 1. Reject or cancel a request while the terminal state write succeeds and its log publication fails. 2. Redeliver the original validation, conflict-signal, or cancellation message. 3. Confirm the retry publishes the original terminal facts without another terminal write; a different terminal winner remains unchanged. Test Plan: The existing Process regression tests exercise failed publication followed by successful replay and compare the original diagnostics, timestamp, and request version. TestTerminateRequest_ReplaysWinningFactsAfterPublishFailure also covers changed retry diagnostics and duplicate delivery. TestRequestTerminalDetailsMigration demonstrates the explicit additive migration, readable legacy NULL details, preserved new diagnostics, and rejection of malformed non-NULL details against MySQL. Materializer tests verify history/mapping repair without overwriting known diagnostics. Verified with ./tool/bazel test //submitqueue/... --test_output=errors (59 targets), the MySQL storage integration target, focused coverage, and repository formatting/lint/module/build/mock checks. Revert Plan: Revert the code while retaining the additive terminal_details column and its persisted facts. Retain failed deliveries for replay; reverting terminal Process repair reopens the missing-log failure.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Persist terminal timestamp, error, and metadata with the winning request snapshot. Replay matching terminal logs from validation, conflict-signal, and cancellation retries without another transition or provider call. Incomplete legacy repairs cannot erase known gateway diagnostics. Builds on #1037.
Reproduction
Test Plan
Extended existing Process regressions compare identical original diagnostics, timestamps, and versions after failed publication and retry.
TestTerminateRequest_ReplaysWinningFactsAfterPublishFailurealso covers changed retry diagnostics and duplicate delivery.TestRequestTerminalDetailsMigrationproves the real MySQL migration, legacy NULL fallback, diagnostic roundtrip, and malformed-detail rejection. Materializer tests prove history/mapping repair without diagnostic loss../tool/bazel test //submitqueue/... --test_output=errors: 59 targets passed. MySQL integration and 12 impacted targets after rebasing also passed; repository mechanical checks passed.Rollout
Apply the additive migration first. Deploy gateway legacy protection before fallback publishers, then replace old consumers.
Revert Plan
Revert code but retain the additive column and persisted facts. Retain failed deliveries for replay; reverting Process repair reopens missing logs.
Issue Links
None; repository audit work, no external ticket.