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

feat(storage): add rpo (turbo replication) support #5003

Merged
merged 12 commits into from Jan 10, 2022

Conversation

BrennaEpp
Copy link
Contributor

Fixes #4911

@BrennaEpp BrennaEpp requested review from a team as code owners October 19, 2021 22:42
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Oct 19, 2021
@product-auto-label product-auto-label bot added the api: storage Issues related to the Cloud Storage API. label Oct 19, 2021
@BrennaEpp BrennaEpp added the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Oct 19, 2021
storage/bucket.go Show resolved Hide resolved

// RPODefault is used to reset RPO on an existing bucket with RPO set to RPOAsyncTurbo.
// Otherwise RPODefault is equivalent to the RPO field being absent, and is always ignored
RPODefault RPO = iota
Copy link
Contributor

Choose a reason for hiding this comment

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

Can RPO be set to default? If so, I think we'd need another unknown-type value to be the zero value. Zeros do not propagate through to the service generally. And I think we'd want to distinguish in bucket attrs between DEFAULT vs. an unknown value (if there is a new enum addition) and/or nothing being returned for that field.

See what I have for PublicAccessPrevention, I'm assuming this should probably operate the same way.

Copy link

Choose a reason for hiding this comment

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

Just for some clarity, in the case of a single region bucket, RPO will not be present in the metadata. For a multiregion bucket, RPO will always come back as DEFAULT.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good note, I've changed this as suggested.

Copy link
Contributor

@tritone tritone left a comment

Choose a reason for hiding this comment

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

Code looks good now; a couple docs comments.

Also @ddelgrosso1 , do we need an integration test for this feature?

storage/bucket.go Outdated Show resolved Hide resolved
storage/bucket.go Outdated Show resolved Hide resolved
storage/bucket.go Outdated Show resolved Hide resolved
Copy link
Contributor

@tritone tritone left a comment

Choose a reason for hiding this comment

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

LGTM, can merge when @ddelgrosso1 gives permission.

@product-auto-label product-auto-label bot added the stale: extraold Pull request is critically old and needs prioritization. label Jan 7, 2022
Copy link

@ddelgrosso1 ddelgrosso1 left a comment

Choose a reason for hiding this comment

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

LGTM.

@product-auto-label product-auto-label bot added the size: s Pull request size is small. label Jan 10, 2022
@BrennaEpp BrennaEpp removed the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Jan 10, 2022
@BrennaEpp BrennaEpp merged commit 3bd5995 into googleapis:main Jan 10, 2022
@BrennaEpp BrennaEpp deleted the rpo branch January 10, 2022 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: storage Issues related to the Cloud Storage API. cla: yes This human has signed the Contributor License Agreement. size: s Pull request size is small. stale: extraold Pull request is critically old and needs prioritization.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

storage: add support for turbo replication
3 participants