Skip to content

perf: read attempt payload columns only when include asks for them - #1187

Open
alexluong wants to merge 1 commit into
mainfrom
perf/attempt-list-payload-columns
Open

alexluong wants to merge 1 commit into
mainfrom
perf/attempt-list-payload-columns

Conversation

@alexluong

@alexluong alexluong commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

Attempt list endpoints always read event data, event metadata and response data from the log store, then drop them unless include asks for them. These can be the largest columns in an attempt row, so a list without include loads payloads that never reach the response. Attempt list reads now take the payload fields to read: the handler asks only for what include needs, and the stores skip the rest. Responses are unchanged for every include combination.

Changes

  1. ListAttemptRequest.Include lists the payload fields to read (event.data, event.metadata, response_data). Nil reads none of them; callers that need the full record pass AllFields.
  2. The attempt list handler sets Include from include: event.data reads event data, event or event.data reads event metadata, response_data reads response data.
  3. The manual retry lookup, the scheduled retry lookup and the ClickHouse ListLatestAttempts fallback pass AllFields, so retries still deliver the full event; tests on both retry lookups fail if they stop asking.
  4. ClickHouse and Postgres select an empty value in place of a column that wasn't asked for; the in-memory store clears those fields.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@alexluong
alexluong force-pushed the perf/attempt-list-payload-columns branch from ffb15a7 to ecce3bf Compare October 30, 2026 14:34

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant