mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-10-21 22:08:52 +08:00
add remove volumes with version info
This commit is contained in:
@@ -105,6 +105,7 @@ func (s *Store) addVolume(vid needle.VolumeId, collection string, needleMapKind
|
||||
Id: uint32(vid),
|
||||
Collection: collection,
|
||||
ReplicaPlacement: uint32(replicaPlacement.Byte()),
|
||||
Version: uint32(volume.Version()),
|
||||
Ttl: ttl.ToUint32(),
|
||||
}
|
||||
return nil
|
||||
@@ -241,6 +242,7 @@ func (s *Store) MountVolume(i needle.VolumeId) error {
|
||||
Id: uint32(v.Id),
|
||||
Collection: v.Collection,
|
||||
ReplicaPlacement: uint32(v.ReplicaPlacement.Byte()),
|
||||
Version: uint32(v.Version()),
|
||||
Ttl: v.Ttl.ToUint32(),
|
||||
}
|
||||
return nil
|
||||
@@ -259,6 +261,7 @@ func (s *Store) UnmountVolume(i needle.VolumeId) error {
|
||||
Id: uint32(v.Id),
|
||||
Collection: v.Collection,
|
||||
ReplicaPlacement: uint32(v.ReplicaPlacement.Byte()),
|
||||
Version: uint32(v.Version()),
|
||||
Ttl: v.Ttl.ToUint32(),
|
||||
}
|
||||
for _, location := range s.Locations {
|
||||
@@ -281,6 +284,7 @@ func (s *Store) DeleteVolume(i needle.VolumeId) error {
|
||||
Id: uint32(v.Id),
|
||||
Collection: v.Collection,
|
||||
ReplicaPlacement: uint32(v.ReplicaPlacement.Byte()),
|
||||
Version: uint32(v.Version()),
|
||||
Ttl: v.Ttl.ToUint32(),
|
||||
}
|
||||
for _, location := range s.Locations {
|
||||
|
@@ -47,6 +47,7 @@ func NewVolumeInfoFromShort(m *master_pb.VolumeShortInformationMessage) (vi Volu
|
||||
vi = VolumeInfo{
|
||||
Id: needle.VolumeId(m.Id),
|
||||
Collection: m.Collection,
|
||||
Version: needle.Version(m.Version),
|
||||
}
|
||||
rp, e := NewReplicaPlacementFromByte(byte(m.ReplicaPlacement))
|
||||
if e != nil {
|
||||
|
Reference in New Issue
Block a user