mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-09-22 18:33:34 +08:00
Fix Filer Sync Issue: 5455 (#5663)
This commit is contained in:

committed by
GitHub

parent
889ff9e7fe
commit
1caa012a76
@@ -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 {
|
||||
|
Reference in New Issue
Block a user