aboutsummaryrefslogtreecommitdiff
path: root/weed/command/volume.go
diff options
context:
space:
mode:
authorchrislu <chris.lu@gmail.com>2022-09-08 18:03:43 -0700
committerchrislu <chris.lu@gmail.com>2022-09-08 18:03:43 -0700
commit9b084d4c88e85e95a1c7279fcb03297ff6e20ad6 (patch)
tree39fedce5b2b80cb9778a2cff533184444ec4dbed /weed/command/volume.go
parenteb7cf3de813723984323fff8308ccda1ad31c2fa (diff)
downloadseaweedfs-9b084d4c88e85e95a1c7279fcb03297ff6e20ad6.tar.xz
seaweedfs-9b084d4c88e85e95a1c7279fcb03297ff6e20ad6.zip
purge tcp implementation
Diffstat (limited to 'weed/command/volume.go')
-rw-r--r--weed/command/volume.go26
1 files changed, 0 insertions, 26 deletions
diff --git a/weed/command/volume.go b/weed/command/volume.go
index 3ad8ba1bb..aa300108a 100644
--- a/weed/command/volume.go
+++ b/weed/command/volume.go
@@ -65,7 +65,6 @@ type VolumeServerOptions struct {
preStopSeconds *int
metricsHttpPort *int
// pulseSeconds *int
- enableTcp *bool
inflightUploadDataTimeout *time.Duration
}
@@ -96,7 +95,6 @@ func init() {
v.pprof = cmdVolume.Flag.Bool("pprof", false, "enable pprof http handlers. precludes --memprofile and --cpuprofile")
v.metricsHttpPort = cmdVolume.Flag.Int("metricsPort", 0, "Prometheus metrics listen port")
v.idxFolder = cmdVolume.Flag.String("dir.idx", "", "directory to store .idx files")
- v.enableTcp = cmdVolume.Flag.Bool("tcp", false, "<experimental> enable tcp port")
v.inflightUploadDataTimeout = cmdVolume.Flag.Duration("inflightUploadDataTimeout", 60*time.Second, "inflight upload data wait timeout of volume servers")
}
@@ -258,11 +256,6 @@ func (v VolumeServerOptions) startVolumeServer(volumeFolders, maxVolumeCounts, v
}
}
- // starting tcp server
- if *v.enableTcp {
- go v.startTcpService(volumeServer)
- }
-
// starting the cluster http server
clusterHttpServer := v.startClusterHttpService(volumeMux)
@@ -388,22 +381,3 @@ func (v VolumeServerOptions) startClusterHttpService(handler http.Handler) httpd
}()
return clusterHttpServer
}
-
-func (v VolumeServerOptions) startTcpService(volumeServer *weed_server.VolumeServer) {
- listeningAddress := util.JoinHostPort(*v.bindIp, *v.port+20000)
- glog.V(0).Infoln("Start Seaweed volume server", util.Version(), "tcp at", listeningAddress)
- listener, e := util.NewListener(listeningAddress, 0)
- if e != nil {
- glog.Fatalf("Volume server listener error on %s:%v", listeningAddress, e)
- }
- defer listener.Close()
-
- for {
- c, err := listener.Accept()
- if err != nil {
- fmt.Println(err)
- return
- }
- go volumeServer.HandleTcpConnection(c)
- }
-}