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

storage: cherry-pick SLRU, metrics and sharded ingest fixes into the release branch #10087

Merged
merged 3 commits into from
Dec 11, 2024

Conversation

VladLazar
Copy link
Contributor

Problem

We get slru truncation commands on non-zero shards.
Compaction will drop the slru dir keys and ingest will fail when receiving such records.
#10080 fixed it for clog, but not for multixact.

Summary of changes

Only truncate multixact slrus on shard zero. I audited the rest of the ingest code and it looks
fine from this pov.

@VladLazar VladLazar requested a review from a team as a code owner December 11, 2024 12:42
@VladLazar VladLazar requested review from yliang412, erikgrinaker and jcsp and removed request for a team and yliang412 December 11, 2024 12:42
VladLazar and others added 2 commits December 11, 2024 14:48
## Problem

Protobuf doesn't support 128 bit integers, so we encode the keys as two
64 bit integers. Issue is that when we split the 128 bit compact key we
use signed 64 bit integers to represent the two halves. This may result
in a negative lower half when relnode is larger than `0x00800000`. When
we convert the lower half to an i128 we get a negative `CompactKey`.

## Summary of Changes

Use unsigned integers when encoding into Protobuf.

## Deployment

* Prod: We disabled the interpreted proto, so no compat concerns.
* Staging: Disable the interpreted proto, do one release, and then
release the fixed version.
We do this because a negative int32 will convert to a large uint32 value
and could give
a key in the actual pageserver space. In production we would around this
by adding new
fields to the proto and deprecating the old ones, but we can make our
lives easy here.
* Pre-prod: Same as staging
…metrics (#10075)

## Problem

With pipelining enabled, the time a request spends in the batcher stage
counts towards the smgr op latency.

If pipelining is disabled, that time is not accounted for.

In practice, this results in a jump in smgr getpage latencies in various
dashboards and degrades the internal SLO.

## Solution

In a similar vein to #10042 and with a similar rationale, this PR stops
counting the time spent in batcher stage towards smgr op latency.

The smgr op latency metric is reduced to the actual execution time.

Time spent in batcher stage is tracked in a separate histogram.
I expect to remove that histogram after batching rollout is complete,
but it will be helpful in the meantime to reason about the rollout.
@VladLazar VladLazar changed the title pageserver: don't drop multixact slrus on non zero shards storage: cherry-pick SLRU, metrics and sharded ingest fixes into the release branch Dec 11, 2024
Copy link

7051 tests run: 6725 passed, 1 failed, 325 skipped (full report)


Failures on Postgres 15

# Run all failed tests locally:
scripts/pytest -vv -n $(nproc) -k "test_pull_timeline[release-pg15-True]"
Flaky tests (5)

Postgres 17

Postgres 16

Postgres 15

Postgres 14

Test coverage report is not available

The comment gets automatically updated with the latest test results
c4ce4ac at 2024-12-11T15:01:19.324Z :recycle:

@VladLazar
Copy link
Contributor Author

  • test_pull_timeline is a known failure and unrelated to this PR.
  • I don't need compute images.

Merging to unblock release.

@VladLazar VladLazar merged commit 5525abd into release Dec 11, 2024
53 of 54 checks passed
@VladLazar VladLazar deleted the vlad/cherry-pick-multixact-truncation-fix branch December 11, 2024 16:02
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.

3 participants