Skip to content

adapter: Drop the frontend_ prefix from peek sequencing and read-then-write names - #39677

Open
ggevay wants to merge 4 commits into
gabor/peek-seq-08-unreachable-coordinator-handlingfrom
gabor/peek-seq-09-rename
Open

ggevay wants to merge 4 commits into
gabor/peek-seq-08-unreachable-coordinator-handlingfrom
gabor/peek-seq-09-rename

Conversation

@ggevay

@ggevay ggevay commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

With the coordinator's peek sequencing and read-then-write paths gone, the frontend_ prefix no longer tells two implementations apart in these names. Renames only, no behavior change.

Best reviewed commit by commit:

  1. Module. frontend_peek.rs becomes peek_sequencing.rs. Pure rename (git show -M).
  2. Peek sequencing names. try_frontend_peek(_inner) becomes try_peek(_inner), frontend_determine_timestamp becomes determine_timestamp, Command::RegisterFrontendPeek/UnregisterFrontendPeek and their handlers become RegisterPeek/UnregisterPeek and handle_(un)register_peek, and the MCP test case for SELECT becomes select_not_vulnerable. The debug span and the debug logs that name these functions follow.
  3. Peek metric label values.
    • mz_slow_message_handling{message_kind}: register-frontend-peek and unregister-frontend-peek become register-peek and unregister-peek.
    • mz_catalog_snapshot_seconds{context} and mz_catalog_snapshot_cache{context}: try_frontend_peek becomes try_peek.
    • No Grafana alert rule or shared dashboard selects these values by name. Panels that group by the label (environmentd health, Release health) show the new series name from this release on.
  4. Read-then-write names. try_frontend_read_then_write(_with_cancel), frontend_read_then_write_applies, PeekClient::frontend_read_then_write (now session_read_then_write, next to background_read_then_write), FrontendWriteAttemptState, FrontendWriteCancellation, the try_frontend_read_then_write catalog-snapshot context and the tests named after them drop the prefix. The module keeps its name, next to coord::read_then_write.

@aljoscha, commit 4 renames your read-then-write code. Shout if you'd rather keep any of these names. Panel 110 of your "Frontend read-then-write" playground dashboard selects context="try_frontend_read_then_write" and needs the new value.

"Frontend" stays where it still distinguishes something: statement logging (the coordinator keeps its own for the statements it sequences), the LaunchDarkly sync (SystemParameterFrontend*), and pgwire's FrontendMessage.

🤖 Generated with Claude Code

@ggevay
ggevay added this pull request to stack #39631 October 8, 2026 14:06
@ggevay ggevay changed the title gabor/peek seq 09 rename adapter: Drop the frontend_ prefix from peek sequencing and read-then-write names Oct 8, 2026
@ggevay
ggevay marked this pull request as ready for review October 8, 2026 14:17
@ggevay
ggevay requested a review from a team as a code owner October 8, 2026 14:17
@ggevay
ggevay force-pushed the gabor/peek-seq-09-rename branch from e3ae28c to 7c8ed04 Compare October 8, 2026 14:30
@ggevay
ggevay force-pushed the gabor/peek-seq-09-rename branch 2 times, most recently from 603801c to 28afc74 Compare October 12, 2026 12:23

@aljoscha aljoscha left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, also okay with the renames to "my" code. Could you also do the follow-up then, please of updating my dashboard once this is in?

On the name peek_sequencing. Maybe we can find sth better. Sequencing used to be the specific thing that the coordinator does for plans. Ahh, on second though might be okay, we still "sequence" it, but just in the frontend. Leave as you want, sorry for the ramble... 😅

@ggevay
ggevay force-pushed the gabor/peek-seq-09-rename branch from 28afc74 to e4a13bc Compare October 12, 2026 20:13
@ggevay
ggevay force-pushed the gabor/peek-seq-09-rename branch from e4a13bc to 07f8cd3 Compare October 12, 2026 20:31
@ggevay
ggevay force-pushed the gabor/peek-seq-09-rename branch from 07f8cd3 to 80ef94a Compare November 10, 2026 15:53
@ggevay
ggevay force-pushed the gabor/peek-seq-09-rename branch from 80ef94a to 3f566f4 Compare November 10, 2026 16:51
@ggevay

ggevay commented Nov 10, 2026

Copy link
Copy Markdown
Contributor Author

Thanks! I'll update the panel on your dashboard once the stack is in. Keeping peek_sequencing.

ggevay and others added 4 commits November 11, 2026 15:44
With the coordinator's peek sequencing gone, the session task's is the only
one, so the `frontend_` prefix no longer tells two implementations apart.
Pure rename, apart from the `mod` line and two comments that name the file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The prefix distinguished the session task's peek sequencing from the
coordinator's, which is gone:
- `try_frontend_peek(_inner)` becomes `try_peek(_inner)`. The debug-level
  span and the debug logs follow, and `test_expected_spans` looks for
  `try_peek_inner`.
- `frontend_determine_timestamp` becomes `determine_timestamp`.
- `Command::RegisterFrontendPeek`/`UnregisterFrontendPeek` and their
  handlers become `RegisterPeek`/`UnregisterPeek`. The coordinator
  registers its own slow-path peeks without a command.
- The MCP test case for SELECT becomes `select_not_vulnerable`.

The metric label values that carry the old names change in the next commit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Follow the renames of the previous commit in two metric label values:
- `mz_slow_message_handling{message_kind}`: `register-frontend-peek` and
  `unregister-frontend-peek` become `register-peek` and `unregister-peek`.
- `mz_catalog_snapshot_seconds{context}` and
  `mz_catalog_snapshot_cache{context}`: `try_frontend_peek` becomes
  `try_peek`.

Dashboards that pick these values by name need the new ones from this
release on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The coordinator's read-then-write path is gone, so the prefix no longer
tells two implementations apart:
- `try_frontend_read_then_write(_with_cancel)` becomes
  `try_read_then_write(_with_cancel)`, and `frontend_read_then_write_applies`
  becomes `read_then_write_applies`. The `context` label value of
  `mz_catalog_snapshot_seconds` and `mz_catalog_snapshot_cache` follows:
  `try_frontend_read_then_write` becomes `try_read_then_write`.
- `PeekClient::frontend_read_then_write` becomes `session_read_then_write`,
  next to `background_read_then_write`.
- `FrontendWriteAttemptState` and `FrontendWriteCancellation` become
  `WriteAttemptState` and `WriteCancellation`.
- Tests: `test_occ_write_visible_to_linearizable_read`, five
  `test_statement_logging_*` tests, and the pgtest
  `occ-pipelined-dml.pt` (`test_pgtest_mz_occ_pipelined_dml`).

The module keeps its name, `frontend_read_then_write`, next to its
coordinator-side counterpart `coord::read_then_write`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ggevay
ggevay force-pushed the gabor/peek-seq-09-rename branch from 3f566f4 to 216f981 Compare November 11, 2026 14:48

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.

2 participants