Skip to content

Commit

Permalink
fix: site replication of bucket deletion sync (minio#352)
Browse files Browse the repository at this point in the history
Bucket deletion timestamp was not being passed back
in GetBucketInfo, which is needed to decide on the bucket
creation/deletion
  • Loading branch information
poornas authored and harshavardhana committed Feb 4, 2025
1 parent 64a8f2e commit 4df7a3a
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 18 deletions.
1 change: 1 addition & 0 deletions cmd/peer-rest-server.go
Original file line number Diff line number Diff line change
Expand Up @@ -1308,6 +1308,7 @@ func (s *peerRESTServer) HeadBucketHandler(mss *grid.MSS) (info *VolInfo, nerr *
return &VolInfo{
Name: bucketInfo.Name,
Created: bucketInfo.Created,
Deleted: bucketInfo.Deleted, // needed for site replication
}, nil
}

Expand Down
1 change: 1 addition & 0 deletions cmd/peer-s3-client.go
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,7 @@ func (client *remotePeerS3Client) GetBucketInfo(ctx context.Context, bucket stri
return BucketInfo{
Name: volInfo.Name,
Created: volInfo.Created,
Deleted: volInfo.Deleted,
}, nil
}

Expand Down
3 changes: 3 additions & 0 deletions cmd/storage-datatypes.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ type VolInfo struct {

// total VolInfo counts
count int

// Date and time when the volume was deleted, if Deleted
Deleted time.Time
}

// FilesInfo represent a list of files, additionally
Expand Down
68 changes: 50 additions & 18 deletions cmd/storage-datatypes_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4df7a3a

Please sign in to comment.