Browse Source

Merge remote-tracking branch 'upstream/master'

pull/361/head
霍晓栋 8 years ago
parent
commit
1c2affea8e
  1. 2
      Dockerfile
  2. 2
      weed/command/export.go
  3. 6
      weed/topology/data_node.go

2
Dockerfile

@ -7,7 +7,7 @@ RUN echo tlsv1 >> ~/.curlrc
RUN \
curl -Lks https://bintray.com$(curl -Lk http://bintray.com/chrislusf/seaweedfs/seaweedfs/_latestVersion | grep linux_amd64.tar.gz | sed -n "/href/ s/.*href=['\"]\([^'\"]*\)['\"].*/\1/gp") | gunzip | tar -xf - -C /opt/weed/ && \
mkdir ./bin && mv weed_*/* ./bin && \
mkdir ./bin && mv ./*/* ./bin && \
chmod +x ./bin/weed
EXPOSE 8080

2
weed/command/export.go

@ -51,7 +51,7 @@ func init() {
var (
output = cmdExport.Flag.String("o", "", "output tar file name, must ends with .tar, or just a \"-\" for stdout")
format = cmdExport.Flag.String("fileNameFormat", defaultFnFormat, "filename formatted with {{.Mime}} {{.Id}} {{.Name}} {{.Ext}}")
newer = cmdExport.Flag.String("newer", "", "export only files newer than this time, default is all files. Must be specified in RFC3339 without timezone")
newer = cmdExport.Flag.String("newer", "", "export only files newer than this time, default is all files. Must be specified in RFC3339 without timezone, e.g. 2006-01-02T15:04:05")
tarOutputFile *tar.Writer
tarHeader tar.Header

6
weed/topology/data_node.go

@ -53,7 +53,7 @@ func (dn *DataNode) UpdateVolumes(actualVolumes []storage.VolumeInfo) (deletedVo
for _, v := range actualVolumes {
actualVolumeMap[v.Id] = v
}
dn.RLock()
dn.Lock()
for vid, v := range dn.volumes {
if _, ok := actualVolumeMap[vid]; !ok {
glog.V(0).Infoln("Deleting volume id:", vid)
@ -62,8 +62,8 @@ func (dn *DataNode) UpdateVolumes(actualVolumes []storage.VolumeInfo) (deletedVo
dn.UpAdjustVolumeCountDelta(-1)
dn.UpAdjustActiveVolumeCountDelta(-1)
}
} //TODO: adjust max volume id, if need to reclaim volume ids
dn.RUnlock()
}
dn.Unlock()
for _, v := range actualVolumes {
dn.AddOrUpdateVolume(v)
}

Loading…
Cancel
Save