From a3c8235f867bb79214083e168912935c90b4fe4a Mon Sep 17 00:00:00 2001 From: ChengLei Shao Date: Wed, 10 Aug 2016 16:11:00 +0800 Subject: [PATCH 1/3] Make Docker build works correctly --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From c4b7966dbee50970ebaf70269d74e96592ff72c9 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Wed, 7 Sep 2016 18:05:57 -0700 Subject: [PATCH 2/3] minor help message change --- weed/command/export.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From 0559aa96738d727e055190301bbb0624c74ced7f Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Wed, 7 Sep 2016 18:13:49 -0700 Subject: [PATCH 3/3] use Lock instead of RLock fix https://github.com/chrislusf/seaweedfs/issues/364 --- weed/topology/data_node.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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) }