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: use StorageResponse only for cluster protocol #30720

Merged
merged 1 commit into from
Dec 13, 2024

Conversation

petrosagg
Copy link
Contributor

The controller was previously generating synthetic StorageResponses for itself via a channel in order to delay shard finalization. However, shard finalization is no longer performed by the storage controller (looks like it moved to StorageCollections). So this PR removes this mechanism and instead drops the state immediately.

Motivation

Tips for reviewer

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.

@petrosagg petrosagg force-pushed the reserve-storage-responses branch from bc41ec3 to 461e99d Compare December 4, 2024 11:43
The controller was previously generating synthetic StorageResponses for
itself via a channel in order to delay shard finalization. However,
shard finalization is no longer performed by the storage controller
(looks like it moved to StorageCollections). So this PR removes this
mechanism and instead drops the state immediately.

Signed-off-by: Petros Angelatos <[email protected]>
@petrosagg petrosagg force-pushed the reserve-storage-responses branch from 461e99d to c3cf99d Compare December 4, 2024 12:32
@petrosagg petrosagg marked this pull request as ready for review December 4, 2024 15:21
@petrosagg petrosagg requested a review from a team as a code owner December 4, 2024 15:21
Copy link
Contributor

@teskje teskje left a comment

Choose a reason for hiding this comment

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

LGTM!

Comment on lines +2108 to +2112
for id in pending_collection_drops {
self.collections
.remove(&id)
.expect("list populated after checking that self.collections contains it");
}
Copy link
Contributor

Choose a reason for hiding this comment

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

The documentation of Controller::collections has this to say:

    /// This collection only grows, although individual collections may be rendered unusable.
    /// This is to prevent the re-binding of identifiers to other descriptions.

Looks like this also wasn't true before, so the comment is wrong. On the other hand, it seems like Controller::exports is never removed from, so maybe the comment should move there?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This comment must be referring back to a very old design goal of having the storage controller permanently bind a global id with a description. This is described in Frank's architecture design doc. For that to work durable state is required but we don't have that so that comment is.. not correct.

I don't know why exports are not cleaned up, that looks like a bug to me because entries will certainly be removed from there once environment restarts and adapter never mentions the dropped exports again (because it has also forgotten about them).

I will delete that comment altogether

@petrosagg petrosagg merged commit 03ceda5 into MaterializeInc:main Dec 13, 2024
79 checks passed
@petrosagg petrosagg deleted the reserve-storage-responses branch December 13, 2024 22:20
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