mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-09-23 04:13:35 +08:00
volume: compaction can cause readonly volumes
address https://github.com/chrislusf/seaweedfs/issues/1233
This commit is contained in:
@@ -51,6 +51,11 @@ func (vs *VolumeServer) VacuumVolumeCommit(ctx context.Context, req *volume_serv
|
||||
} else {
|
||||
glog.V(1).Infof("commit volume %d", req.VolumeId)
|
||||
}
|
||||
if err == nil {
|
||||
if vs.store.GetVolume(needle.VolumeId(req.VolumeId)).IsReadOnly() {
|
||||
resp.IsReadOnly = true
|
||||
}
|
||||
}
|
||||
|
||||
return resp, err
|
||||
|
||||
|
Reference in New Issue
Block a user