diff options
| author | chrislu <chris.lu@gmail.com> | 2024-06-12 00:32:04 -0700 |
|---|---|---|
| committer | chrislu <chris.lu@gmail.com> | 2024-06-12 00:32:04 -0700 |
| commit | 458dda56ae387fc5341fb3dd9b08a07449924749 (patch) | |
| tree | 37b39a6bd278724e14f83e2d58b90e3bf963c506 /weed/server/filer_server.go | |
| parent | 0cd1c4be48e634740de1d83c5b34b77bed984f27 (diff) | |
| parent | 4744889973536c8bc72de3c5d91650ea53193745 (diff) | |
| download | seaweedfs-458dda56ae387fc5341fb3dd9b08a07449924749.tar.xz seaweedfs-458dda56ae387fc5341fb3dd9b08a07449924749.zip | |
Merge branch 'master' into mq
Diffstat (limited to 'weed/server/filer_server.go')
| -rw-r--r-- | weed/server/filer_server.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/weed/server/filer_server.go b/weed/server/filer_server.go index ec1dff445..795cd3ccc 100644 --- a/weed/server/filer_server.go +++ b/weed/server/filer_server.go @@ -74,6 +74,7 @@ type FilerOption struct { DiskType string AllowedOrigins []string ExposeDirectoryData bool + JoinExistingFiler bool } type FilerServer struct { @@ -197,6 +198,9 @@ func NewFilerServer(defaultMux, readonlyMux *http.ServeMux, option *FilerOption) existingNodes := fs.filer.ListExistingPeerUpdates() startFromTime := time.Now().Add(-filer.LogFlushInterval) + if option.JoinExistingFiler { + startFromTime = time.Time{} + } if isFresh { glog.V(0).Infof("%s bootstrap from peers %+v", option.Host, existingNodes) if err := fs.filer.MaybeBootstrapFromPeers(option.Host, existingNodes, startFromTime); err != nil { |
