mirror of
https://github.com/pgsty/minio.git
synced 2026-07-22 21:50:22 +03:00
Add support for multi site replication (#12880)
This commit is contained in:
committed by
GitHub
parent
0b8c5a6872
commit
c4373ef290
@@ -169,11 +169,8 @@ type FileInfo struct {
|
||||
// Erasure info for all objects.
|
||||
Erasure ErasureInfo
|
||||
|
||||
// DeleteMarkerReplicationStatus is set when this FileInfo represents
|
||||
// replication on a DeleteMarker
|
||||
MarkDeleted bool // mark this version as deleted
|
||||
DeleteMarkerReplicationStatus string
|
||||
VersionPurgeStatus VersionPurgeStatusType
|
||||
MarkDeleted bool // mark this version as deleted
|
||||
ReplicationState ReplicationState // Internal replication state to be passed back in ObjectInfo
|
||||
|
||||
Data []byte // optionally carries object data
|
||||
|
||||
@@ -200,30 +197,6 @@ func (fi *FileInfo) SetInlineData() {
|
||||
// VersionPurgeStatusKey denotes purge status in metadata
|
||||
const VersionPurgeStatusKey = "purgestatus"
|
||||
|
||||
// VersionPurgeStatusType represents status of a versioned delete or permanent delete w.r.t bucket replication
|
||||
type VersionPurgeStatusType string
|
||||
|
||||
const (
|
||||
// Pending - versioned delete replication is pending.
|
||||
Pending VersionPurgeStatusType = "PENDING"
|
||||
|
||||
// Complete - versioned delete replication is now complete, erase version on disk.
|
||||
Complete VersionPurgeStatusType = "COMPLETE"
|
||||
|
||||
// Failed - versioned delete replication failed.
|
||||
Failed VersionPurgeStatusType = "FAILED"
|
||||
)
|
||||
|
||||
// Empty returns true if purge status was not set.
|
||||
func (v VersionPurgeStatusType) Empty() bool {
|
||||
return string(v) == ""
|
||||
}
|
||||
|
||||
// Pending returns true if the version is pending purge.
|
||||
func (v VersionPurgeStatusType) Pending() bool {
|
||||
return v == Pending || v == Failed
|
||||
}
|
||||
|
||||
// newFileInfo - initializes new FileInfo, allocates a fresh erasure info.
|
||||
func newFileInfo(object string, dataBlocks, parityBlocks int) (fi FileInfo) {
|
||||
fi.Erasure = ErasureInfo{
|
||||
|
||||
Reference in New Issue
Block a user