-
Notifications
You must be signed in to change notification settings - Fork 20
Support multi-destination CRR with V2 replication configuration #2627
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
base: development/8.4
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,17 +23,24 @@ export type Backend = { | |
| site: string; | ||
| status: string; | ||
| dataStoreVersionId: string; | ||
| destination?: string; | ||
| role?: string; | ||
| }; | ||
|
|
||
| export type ReplicationInfo = { | ||
| status: string; | ||
| backends: Backend[]; | ||
| content: string[]; | ||
| destination: string; | ||
| storageClass: string; | ||
| role: string; | ||
| storageType: string; | ||
| dataStoreVersionId: string; | ||
| /** @deprecated in favor of per-backend destination for multi-destination CRR. */ | ||
| destination?: string; | ||
| /** @deprecated in favor of per-backend storageClass for multi-destination CRR. */ | ||
| storageClass?: string; | ||
| /** @deprecated in favor of per-backend role for multi-destination CRR. */ | ||
| role?: string; | ||
| /** @deprecated in favor of per-backend storageType for multi-destination CRR. */ | ||
| storageType?: string; | ||
| /** @deprecated in favor of per-backend dataStoreVersionId for multi-destination. */ | ||
| dataStoreVersionId?: string; | ||
|
maeldonn marked this conversation as resolved.
|
||
| isNFS?: boolean; | ||
| }; | ||
|
|
||
|
|
@@ -1175,6 +1182,7 @@ export default class ObjectMD { | |
| return undefined; | ||
| } | ||
|
|
||
| /** @deprecated in favor of per-backend dataStoreVersionId for multi-destination CRR. */ | ||
| setReplicationDataStoreVersionId(versionId: string) { | ||
| this._data.replicationInfo.dataStoreVersionId = versionId; | ||
| return this; | ||
|
|
@@ -1205,26 +1213,31 @@ export default class ObjectMD { | |
| return this; | ||
| } | ||
|
|
||
| /** @deprecated in favor of per-backend storageType for multi-destination CRR. */ | ||
| setReplicationStorageType(storageType: string) { | ||
| this._data.replicationInfo.storageType = storageType; | ||
| return this; | ||
| } | ||
|
|
||
| /** @deprecated in favor of per-backend storageClass for multi-destination CRR. */ | ||
| setReplicationStorageClass(storageClass: string) { | ||
| this._data.replicationInfo.storageClass = storageClass; | ||
| return this; | ||
| } | ||
|
|
||
| /** @deprecated in favor of per-backend destination for multi-destination CRR. */ | ||
| setReplicationTargetBucket(destination: string) { | ||
| this._data.replicationInfo.destination = destination; | ||
| return this; | ||
| } | ||
|
|
||
| /** @deprecated in favor of per-backend role for multi-destination CRR. */ | ||
| setReplicationRoles(role: string) { | ||
| this._data.replicationInfo.role = role; | ||
| return this; | ||
| } | ||
|
|
||
| /** @deprecated in favor of per-backend dataStoreVersionId for multi-destination. */ | ||
| getReplicationDataStoreVersionId() { | ||
| return this._data.replicationInfo.dataStoreVersionId; | ||
| } | ||
|
|
@@ -1241,20 +1254,24 @@ export default class ObjectMD { | |
| return this._data.replicationInfo.content; | ||
| } | ||
|
|
||
| /** @deprecated in favor of per-backend role for multi-destination CRR. */ | ||
| getReplicationRoles() { | ||
| return this._data.replicationInfo.role; | ||
| } | ||
|
|
||
| /** @deprecated in favor of per-backend storageType for multi-destination CRR. */ | ||
| getReplicationStorageType() { | ||
| return this._data.replicationInfo.storageType; | ||
| } | ||
|
|
||
| /** @deprecated in favor of per-backend storageClass for multi-destination CRR. */ | ||
| getReplicationStorageClass() { | ||
| return this._data.replicationInfo.storageClass; | ||
| } | ||
|
|
||
| /** @deprecated in favor of per-backend destination for multi-destination CRR. */ | ||
| getReplicationTargetBucket() { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should this function still be used?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This function is now deprecated. |
||
| const destBucketArn = this._data.replicationInfo.destination; | ||
| const destBucketArn = this._data.replicationInfo.destination ?? ''; | ||
| return destBucketArn.split(':').slice(-1)[0]; | ||
| } | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mandatory for CRR, right?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but optional for backward compatibility.