Skip to content

Commit

Permalink
Set additional header for deletemarker replication (#1715)
Browse files Browse the repository at this point in the history
to check if target is ready to receive the object version
  • Loading branch information
poornas committed Oct 21, 2022
1 parent c0a2c4a commit c6319be
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
5 changes: 3 additions & 2 deletions api-get-options.go
Expand Up @@ -27,8 +27,9 @@ import (

// AdvancedGetOptions for internal use by MinIO server - not intended for client use.
type AdvancedGetOptions struct {
ReplicationDeleteMarker bool
ReplicationProxyRequest string
ReplicationDeleteMarker bool
IsReplicationReadyForDeleteMarker bool
ReplicationProxyRequest string
}

// GetObjectOptions are used to specify additional headers or options
Expand Down
3 changes: 3 additions & 0 deletions api-stat.go
Expand Up @@ -70,6 +70,9 @@ func (c *Client) StatObject(ctx context.Context, bucketName, objectName string,
if opts.Internal.ReplicationDeleteMarker {
headers.Set(minIOBucketReplicationDeleteMarker, "true")
}
if opts.Internal.IsReplicationReadyForDeleteMarker {
headers.Set(isMinioTgtReplicationReady, "true")
}

urlValues := make(url.Values)
if opts.VersionID != "" {
Expand Down
2 changes: 2 additions & 0 deletions constants.go
Expand Up @@ -103,4 +103,6 @@ const (
minIOForceDelete = "x-minio-force-delete"
// Header indicates delete marker replication request can be sent by source now.
minioTgtReplicationReady = "X-Minio-Replication-Ready"
// Header asks if delete marker replication request can be sent by source now.
isMinioTgtReplicationReady = "X-Minio-Check-Replication-Ready"
)

0 comments on commit c6319be

Please sign in to comment.