This commit is contained in:
gotoeasy 2022-10-07 20:56:58 +08:00
parent 191017be27
commit d1bb74c626
3 changed files with 8 additions and 2 deletions

View File

@ -65,6 +65,11 @@ func checkAndCopyDataFromRemote() {
}
}
if len(mapStore) == 0 {
log.Println("历史数据检查同步结束(没有其他节点数据可对比)")
return
}
// 本地
todayStoreName := cmn.GeyStoreNameByDate("") // 当天日志仓名
rs := sysmnt.GetStorageList()
@ -117,7 +122,7 @@ func checkAndCopyDataFromRemote() {
mstore := mapStore[md.Name]
if mstore == nil || md.LogCount >= mstore.LogCount {
log.Println("本地完整,跳过", md.Name)
log.Println("本地完整,跳过", md.Name)
continue // 本地更完整
}

View File

@ -34,7 +34,7 @@ func (d *ClusterInfo) LoadJson(jsonstr string) error {
}
// 启动时加入集群
func init() {
func joinCluster() {
if !conf.IsClusterMode() {
return
}

View File

@ -13,6 +13,7 @@ func Start() {
}
log.Println("集群节点启动", cmn.GetLocalGlcUrl())
joinCluster()
kv, err := service.GetSysmntItem(KEY_CLUSTER)
if err != nil {
log.Println(err)