Fix Filer Sync Issue: 5455 (#5663)

This commit is contained in:
MeenakshiSachdeva authored and GitHub committed 2024-06-10 09:19:38 -07:00
1 parent 889ff9e7fe
commit 1caa012a76
2 files changed
+7

No files matched your search

+4
View File
@@ -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 {