Skip to content

Commit 4df7a3a

Browse files
poornasharshavardhana
authored andcommitted
fix: site replication of bucket deletion sync (minio#352)
Bucket deletion timestamp was not being passed back in GetBucketInfo, which is needed to decide on the bucket creation/deletion
1 parent 64a8f2e commit 4df7a3a

File tree

4 files changed

+55
-18
lines changed

4 files changed

+55
-18
lines changed

cmd/peer-rest-server.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1308,6 +1308,7 @@ func (s *peerRESTServer) HeadBucketHandler(mss *grid.MSS) (info *VolInfo, nerr *
13081308
return &VolInfo{
13091309
Name: bucketInfo.Name,
13101310
Created: bucketInfo.Created,
1311+
Deleted: bucketInfo.Deleted, // needed for site replication
13111312
}, nil
13121313
}
13131314

cmd/peer-s3-client.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,7 @@ func (client *remotePeerS3Client) GetBucketInfo(ctx context.Context, bucket stri
393393
return BucketInfo{
394394
Name: volInfo.Name,
395395
Created: volInfo.Created,
396+
Deleted: volInfo.Deleted,
396397
}, nil
397398
}
398399

cmd/storage-datatypes.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,9 @@ type VolInfo struct {
111111

112112
// total VolInfo counts
113113
count int
114+
115+
// Date and time when the volume was deleted, if Deleted
116+
Deleted time.Time
114117
}
115118

116119
// FilesInfo represent a list of files, additionally

cmd/storage-datatypes_gen.go

Lines changed: 50 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)