mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-09-19 11:47:56 +08:00
volume: compaction can cause readonly volumes
address https://github.com/chrislusf/seaweedfs/issues/1233
This commit is contained in:
@@ -215,7 +215,7 @@ func (v *Volume) ToVolumeInformationMessage() *master_pb.VolumeInformationMessag
|
||||
FileCount: v.FileCount(),
|
||||
DeleteCount: v.DeletedCount(),
|
||||
DeletedByteCount: v.DeletedSize(),
|
||||
ReadOnly: v.noWriteOrDelete || v.noWriteCanDelete,
|
||||
ReadOnly: v.IsReadOnly(),
|
||||
ReplicaPlacement: uint32(v.ReplicaPlacement.Byte()),
|
||||
Version: uint32(v.Version()),
|
||||
Ttl: v.Ttl.ToUint32(),
|
||||
@@ -237,3 +237,7 @@ func (v *Volume) RemoteStorageNameKey() (storageName, storageKey string) {
|
||||
}
|
||||
return v.volumeInfo.GetFiles()[0].BackendName(), v.volumeInfo.GetFiles()[0].GetKey()
|
||||
}
|
||||
|
||||
func (v *Volume) IsReadOnly() bool {
|
||||
return v.noWriteOrDelete || v.noWriteCanDelete
|
||||
}
|
||||
|
Reference in New Issue
Block a user