Fix Filer Sync Issue: 5455 (#5663)

This commit is contained in:
MeenakshiSachdeva
2024-06-10 21:49:38 +05:30
committed by GitHub
parent 889ff9e7fe
commit 1caa012a76
2 changed files with 7 additions and 0 deletions

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 {