aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author霍晓栋 <huoxd@jiedaibao.com>2016-09-08 10:34:24 +0800
committer霍晓栋 <huoxd@jiedaibao.com>2016-09-08 10:34:24 +0800
commit1c2affea8e2a074b13b1cb4d925a97464cbee76c (patch)
treebd77e4d8fc5ff38ca3e4fe9ee2b2d3112aeb0727
parent3aa021a812317fa640ebe2c7ec3b2a78492fa319 (diff)
parent0559aa96738d727e055190301bbb0624c74ced7f (diff)
downloadseaweedfs-1c2affea8e2a074b13b1cb4d925a97464cbee76c.tar.xz
seaweedfs-1c2affea8e2a074b13b1cb4d925a97464cbee76c.zip
Merge remote-tracking branch 'upstream/master'
-rw-r--r--Dockerfile2
-rw-r--r--weed/command/export.go2
-rw-r--r--weed/topology/data_node.go6
3 files changed, 5 insertions, 5 deletions
diff --git a/Dockerfile b/Dockerfile
index b2291c15f..e87538fdb 100644
--- a/Dockerfile
+++ b/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
diff --git a/weed/command/export.go b/weed/command/export.go
index 481aa111b..5a7dc71d9 100644
--- a/weed/command/export.go
+++ b/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
diff --git a/weed/topology/data_node.go b/weed/topology/data_node.go
index da6ed2895..b7f039559 100644
--- a/weed/topology/data_node.go
+++ b/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)
}