volume: handling readonly volumes after compaction

ensure readonly volumes are not added as writable
This commit is contained in:
Chris Lu
2020-03-13 15:41:24 -07:00
parent 025e586c91
commit c90eb0da1f
2 changed files with 19 additions and 15 deletions

View File

@@ -5,9 +5,10 @@ import (
"sync/atomic"
"time"
"github.com/chrislusf/seaweedfs/weed/storage/needle"
"google.golang.org/grpc"
"github.com/chrislusf/seaweedfs/weed/storage/needle"
"github.com/chrislusf/seaweedfs/weed/glog"
"github.com/chrislusf/seaweedfs/weed/operation"
"github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb"
@@ -105,7 +106,9 @@ func batchVacuumVolumeCommit(grpcDialOption grpc.DialOption, vl *VolumeLayout, v
} else {
glog.V(0).Infof("Complete Committing vacuum %d on %s", vid, dn.Url())
}
if isCommitSuccess {
}
if isCommitSuccess {
for _, dn := range locationlist.list {
vl.SetVolumeAvailable(dn, vid)
}
}