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

adapter,controller: add replica status history #29365

Merged
merged 3 commits into from
Sep 12, 2024

Conversation

teskje
Copy link
Contributor

@teskje teskje commented Sep 4, 2024

This PR adds a new builtin source mz_cluster_replica_status_history, which contains the data already present in mz_cluster_replica_statuses but as a (pseudo-) append-only collection, rather than a retained-metrics collection.

The plan is to remove mz_cluster_replica_statuses in favor of the new history source once all internal clients have been migrated.

Motivation

  • This PR adds a known-desirable feature.

Part of https://github.com/MaterializeInc/database-issues/issues/8403

Checklist

  • This PR has adequate test coverage / QA involvement has been duly considered. (trigger-ci for additional test/nightly runs)
  • This PR has an associated up-to-date design doc, is a design doc (template), or is sufficiently small to not require a design.
  • If this PR evolves an existing $T ⇔ Proto$T mapping (possibly in a backwards-incompatible way), then it is tagged with a T-proto label.
  • If this PR will require changes to cloud orchestration or tests, there is a companion cloud PR to account for those changes that is tagged with the release-blocker label (example).
  • If this PR includes major user-facing behavior changes, I have pinged the relevant PM to schedule a changelog post.

@teskje teskje force-pushed the mz_cluster_replica_status_history branch from 19414cb to 785592f Compare September 9, 2024 08:59
@teskje teskje marked this pull request as ready for review September 9, 2024 12:28
@teskje teskje requested review from a team as code owners September 9, 2024 12:29
@teskje teskje requested a review from ParkMyCar September 9, 2024 12:29
@teskje teskje requested a review from petrosagg September 9, 2024 12:41
src/storage-controller/src/lib.rs Outdated Show resolved Hide resolved
src/storage-controller/src/lib.rs Outdated Show resolved Hide resolved
@teskje teskje force-pushed the mz_cluster_replica_status_history branch from 785592f to 914c2fb Compare September 10, 2024 10:47
@teskje teskje requested a review from benesch September 10, 2024 10:50
Copy link
Contributor

@kay-kim kay-kim left a comment

Choose a reason for hiding this comment

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

for the docs part, lgtm

This commit adds a new `mz_cluster_replica_status_history` source, which
is a log-style version of `mz_cluster_replica_statuses`.

This deprecates `mz_cluster_replica_statuses` but doesn't remove it yet,
to give us time to migrate internal clients.
This commit adds support for truncation of the `ReplicaStatusHistory`
collection during storage controller startup.

In contrast to the other status histories, the replica status history is
keyed by two columns (`replica_id`, `process_id`), so we need to modify
the truncation code to work with multi-column keys. To this end, a
`StatusHistoryDesc` type is introduced that allows the caller to
configure the truncation behavior while being generic over the key type.
@teskje teskje force-pushed the mz_cluster_replica_status_history branch from 914c2fb to c96b861 Compare September 12, 2024 08:35
@teskje teskje enabled auto-merge September 12, 2024 09:25
@teskje
Copy link
Contributor Author

teskje commented Sep 12, 2024

TFTRs!

@teskje teskje merged commit 95aa493 into MaterializeInc:main Sep 12, 2024
85 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Sep 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants