From ad4d46133233c2a5f82e4b413d060a341c88d2f0 Mon Sep 17 00:00:00 2001 From: Tim Beatham Date: Thu, 18 Jan 2024 09:59:37 +0000 Subject: [PATCH] main - Preparation for demo --- pkg/crdt/datastore.go | 2 +- pkg/sync/syncer.go | 13 ++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/pkg/crdt/datastore.go b/pkg/crdt/datastore.go index a6c871c..d75e633 100644 --- a/pkg/crdt/datastore.go +++ b/pkg/crdt/datastore.go @@ -341,7 +341,7 @@ func (m *TwoPhaseStoreMeshManager) RemoveRoutes(nodeId string, routes ...mesh.Ro for _, route := range routes { changes = true - logging.Log.WriteInfof("deleting: %s", route.GetDestination().String()) + logging.Log.WriteInfof("deleting route: %s", route.GetDestination().String()) delete(node.Routes, route.GetDestination().String()) } diff --git a/pkg/sync/syncer.go b/pkg/sync/syncer.go index 013110a..8c5259f 100644 --- a/pkg/sync/syncer.go +++ b/pkg/sync/syncer.go @@ -242,15 +242,14 @@ func (s *SyncerImpl) SyncMeshes() error { if err != nil { logging.Log.WriteErrorf("failed to update config %s", err.Error()) } - - err = s.meshManager.GetRouteManager().UpdateRoutes() - - if err != nil { - logging.Log.WriteErrorf("update routes failed %s", err.Error()) - } } - return err + err = s.meshManager.GetRouteManager().UpdateRoutes() + if err != nil { + logging.Log.WriteErrorf("update routes failed %s", err.Error()) + } + + return nil } type NewSyncerParams struct {