mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-10-21 19:10:03 +08:00
volume info collect compact revision number
This commit is contained in:
@@ -121,7 +121,9 @@ func (s *Store) Status() []*VolumeInfo {
|
||||
DeleteCount: v.nm.DeletedCount(),
|
||||
DeletedByteCount: v.nm.DeletedSize(),
|
||||
ReadOnly: v.readOnly,
|
||||
Ttl: v.Ttl}
|
||||
Ttl: v.Ttl,
|
||||
CompactRevision: uint32(v.CompactRevision),
|
||||
}
|
||||
stats = append(stats, s)
|
||||
}
|
||||
location.RUnlock()
|
||||
|
@@ -148,5 +148,6 @@ func (v *Volume) ToVolumeInformationMessage() *master_pb.VolumeInformationMessag
|
||||
ReplicaPlacement: uint32(v.ReplicaPlacement.Byte()),
|
||||
Version: uint32(v.Version()),
|
||||
Ttl: v.Ttl.ToUint32(),
|
||||
CompactRevision: uint32(v.SuperBlock.CompactRevision),
|
||||
}
|
||||
}
|
||||
|
@@ -18,6 +18,7 @@ type VolumeInfo struct {
|
||||
DeleteCount int
|
||||
DeletedByteCount uint64
|
||||
ReadOnly bool
|
||||
CompactRevision uint32
|
||||
}
|
||||
|
||||
func NewVolumeInfo(m *master_pb.VolumeInformationMessage) (vi VolumeInfo, err error) {
|
||||
@@ -30,6 +31,7 @@ func NewVolumeInfo(m *master_pb.VolumeInformationMessage) (vi VolumeInfo, err er
|
||||
DeletedByteCount: m.DeletedByteCount,
|
||||
ReadOnly: m.ReadOnly,
|
||||
Version: Version(m.Version),
|
||||
CompactRevision: m.CompactRevision,
|
||||
}
|
||||
rp, e := NewReplicaPlacementFromByte(byte(m.ReplicaPlacement))
|
||||
if e != nil {
|
||||
@@ -57,6 +59,7 @@ func (vi VolumeInfo) ToVolumeInformationMessage() *master_pb.VolumeInformationMe
|
||||
ReplicaPlacement: uint32(vi.ReplicaPlacement.Byte()),
|
||||
Version: uint32(vi.Version),
|
||||
Ttl: vi.Ttl.ToUint32(),
|
||||
CompactRevision: vi.CompactRevision,
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user