Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

safekeeper: short-circuit interpreted wal sender #10202

Merged
merged 1 commit into from
Dec 19, 2024

Conversation

VladLazar
Copy link
Contributor

Problem

Safekeeper may currently send a batch to the pageserver even if it hasn't decoded a new record.
I think this is quite unlikely in the field, but worth adressing.

Summary of changes

Don't send anything if we haven't decoded a full record. Once this merges and releases, the InterpretedWalRecords struct can be updated to remove the Option wrapper for next_record_lsn.

It may currently send a batch even if it hasn't decoded a new record.
Pageserver treats this as a no-op. Once this merges and releases, the
`InterpretedWalRecords` struct can be updated to remove the Option
wrapper for `next_record_lsn`.
@VladLazar VladLazar marked this pull request as ready for review December 19, 2024 12:18
@VladLazar VladLazar requested a review from a team as a code owner December 19, 2024 12:18
erikgrinaker
erikgrinaker approved these changes Dec 19, 2024
safekeeper/src/send_interpreted_wal.rs Show resolved Hide resolved
safekeeper/src/send_interpreted_wal.rs Show resolved Hide resolved
Copy link

7095 tests run: 6797 passed, 0 failed, 298 skipped (full report)


Flaky tests (1)

Postgres 16

  • test_physical_replication_config_mismatch_max_locks_per_transaction: release-arm64

Code coverage* (full report)

  • functions: 31.2% (8393 of 26870 functions)
  • lines: 48.0% (66639 of 138953 lines)

* collected from Rust tests only


The comment gets automatically updated with the latest test results
4047087 at 2024-12-19T13:18:46.744Z :recycle:

@VladLazar VladLazar added this pull request to the merge queue Dec 19, 2024
Merged via the queue into main with commit 628451d Dec 19, 2024
85 checks passed
@VladLazar VladLazar deleted the vlad/short-circuit-wal-sender branch December 19, 2024 14:05
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