aboutsummaryrefslogtreecommitdiff
path: root/weed/server/filer_server.go
diff options
context:
space:
mode:
Diffstat (limited to 'weed/server/filer_server.go')
-rw-r--r--weed/server/filer_server.go82
1 files changed, 39 insertions, 43 deletions
diff --git a/weed/server/filer_server.go b/weed/server/filer_server.go
index 6bf0261ee..1e220d5db 100644
--- a/weed/server/filer_server.go
+++ b/weed/server/filer_server.go
@@ -8,45 +8,45 @@ import (
"sync"
"time"
- "github.com/chrislusf/seaweedfs/weed/stats"
+ "github.com/seaweedfs/seaweedfs/weed/stats"
"google.golang.org/grpc"
- "github.com/chrislusf/seaweedfs/weed/util/grace"
-
- "github.com/chrislusf/seaweedfs/weed/operation"
- "github.com/chrislusf/seaweedfs/weed/pb"
- "github.com/chrislusf/seaweedfs/weed/pb/filer_pb"
- "github.com/chrislusf/seaweedfs/weed/pb/master_pb"
- "github.com/chrislusf/seaweedfs/weed/util"
-
- "github.com/chrislusf/seaweedfs/weed/filer"
- _ "github.com/chrislusf/seaweedfs/weed/filer/arangodb"
- _ "github.com/chrislusf/seaweedfs/weed/filer/cassandra"
- _ "github.com/chrislusf/seaweedfs/weed/filer/elastic/v7"
- _ "github.com/chrislusf/seaweedfs/weed/filer/etcd"
- _ "github.com/chrislusf/seaweedfs/weed/filer/hbase"
- _ "github.com/chrislusf/seaweedfs/weed/filer/leveldb"
- _ "github.com/chrislusf/seaweedfs/weed/filer/leveldb2"
- _ "github.com/chrislusf/seaweedfs/weed/filer/leveldb3"
- _ "github.com/chrislusf/seaweedfs/weed/filer/mongodb"
- _ "github.com/chrislusf/seaweedfs/weed/filer/mysql"
- _ "github.com/chrislusf/seaweedfs/weed/filer/mysql2"
- _ "github.com/chrislusf/seaweedfs/weed/filer/postgres"
- _ "github.com/chrislusf/seaweedfs/weed/filer/postgres2"
- _ "github.com/chrislusf/seaweedfs/weed/filer/redis"
- _ "github.com/chrislusf/seaweedfs/weed/filer/redis2"
- _ "github.com/chrislusf/seaweedfs/weed/filer/redis3"
- _ "github.com/chrislusf/seaweedfs/weed/filer/sqlite"
- _ "github.com/chrislusf/seaweedfs/weed/filer/ydb"
- "github.com/chrislusf/seaweedfs/weed/glog"
- "github.com/chrislusf/seaweedfs/weed/notification"
- _ "github.com/chrislusf/seaweedfs/weed/notification/aws_sqs"
- _ "github.com/chrislusf/seaweedfs/weed/notification/gocdk_pub_sub"
- _ "github.com/chrislusf/seaweedfs/weed/notification/google_pub_sub"
- _ "github.com/chrislusf/seaweedfs/weed/notification/kafka"
- _ "github.com/chrislusf/seaweedfs/weed/notification/log"
- "github.com/chrislusf/seaweedfs/weed/security"
+ "github.com/seaweedfs/seaweedfs/weed/util/grace"
+
+ "github.com/seaweedfs/seaweedfs/weed/operation"
+ "github.com/seaweedfs/seaweedfs/weed/pb"
+ "github.com/seaweedfs/seaweedfs/weed/pb/filer_pb"
+ "github.com/seaweedfs/seaweedfs/weed/pb/master_pb"
+ "github.com/seaweedfs/seaweedfs/weed/util"
+
+ "github.com/seaweedfs/seaweedfs/weed/filer"
+ _ "github.com/seaweedfs/seaweedfs/weed/filer/arangodb"
+ _ "github.com/seaweedfs/seaweedfs/weed/filer/cassandra"
+ _ "github.com/seaweedfs/seaweedfs/weed/filer/elastic/v7"
+ _ "github.com/seaweedfs/seaweedfs/weed/filer/etcd"
+ _ "github.com/seaweedfs/seaweedfs/weed/filer/hbase"
+ _ "github.com/seaweedfs/seaweedfs/weed/filer/leveldb"
+ _ "github.com/seaweedfs/seaweedfs/weed/filer/leveldb2"
+ _ "github.com/seaweedfs/seaweedfs/weed/filer/leveldb3"
+ _ "github.com/seaweedfs/seaweedfs/weed/filer/mongodb"
+ _ "github.com/seaweedfs/seaweedfs/weed/filer/mysql"
+ _ "github.com/seaweedfs/seaweedfs/weed/filer/mysql2"
+ _ "github.com/seaweedfs/seaweedfs/weed/filer/postgres"
+ _ "github.com/seaweedfs/seaweedfs/weed/filer/postgres2"
+ _ "github.com/seaweedfs/seaweedfs/weed/filer/redis"
+ _ "github.com/seaweedfs/seaweedfs/weed/filer/redis2"
+ _ "github.com/seaweedfs/seaweedfs/weed/filer/redis3"
+ _ "github.com/seaweedfs/seaweedfs/weed/filer/sqlite"
+ _ "github.com/seaweedfs/seaweedfs/weed/filer/ydb"
+ "github.com/seaweedfs/seaweedfs/weed/glog"
+ "github.com/seaweedfs/seaweedfs/weed/notification"
+ _ "github.com/seaweedfs/seaweedfs/weed/notification/aws_sqs"
+ _ "github.com/seaweedfs/seaweedfs/weed/notification/gocdk_pub_sub"
+ _ "github.com/seaweedfs/seaweedfs/weed/notification/google_pub_sub"
+ _ "github.com/seaweedfs/seaweedfs/weed/notification/kafka"
+ _ "github.com/seaweedfs/seaweedfs/weed/notification/log"
+ "github.com/seaweedfs/seaweedfs/weed/security"
)
type FilerOption struct {
@@ -88,10 +88,7 @@ type FilerServer struct {
// track known metadata listeners
knownListenersLock sync.Mutex
- knownListeners map[int32]struct{}
-
- brokers map[string]map[string]bool
- brokersLock sync.Mutex
+ knownListeners map[int32]int32
inFlightDataSize int64
inFlightDataLimitCond *sync.Cond
@@ -111,8 +108,7 @@ func NewFilerServer(defaultMux, readonlyMux *http.ServeMux, option *FilerOption)
fs = &FilerServer{
option: option,
grpcDialOption: security.LoadClientTLS(util.GetViper(), "grpc.filer"),
- knownListeners: make(map[int32]struct{}),
- brokers: make(map[string]map[string]bool),
+ knownListeners: make(map[int32]int32),
inFlightDataLimitCond: sync.NewCond(new(sync.Mutex)),
}
fs.listenersCond = sync.NewCond(&fs.listenersLock)
@@ -150,7 +146,7 @@ func NewFilerServer(defaultMux, readonlyMux *http.ServeMux, option *FilerOption)
v.SetDefault("filer.options.buckets_folder", "/buckets")
fs.filer.DirBucketsPath = v.GetString("filer.options.buckets_folder")
// TODO deprecated, will be be removed after 2020-12-31
- // replaced by https://github.com/chrislusf/seaweedfs/wiki/Path-Specific-Configuration
+ // replaced by https://github.com/seaweedfs/seaweedfs/wiki/Path-Specific-Configuration
// fs.filer.FsyncBuckets = v.GetStringSlice("filer.options.buckets_fsync")
isFresh := fs.filer.LoadConfiguration(v)