Skip to content

Commit 638cdbd

Browse files
authored
Merge pull request #162 from Revolyssup/fix
Fix failing state sync and remove extranous error log
2 parents ad682e4 + d909b72 commit 638cdbd

File tree

3 files changed

+13
-34
lines changed

3 files changed

+13
-34
lines changed

internal/config/default_config.go

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -67,18 +67,18 @@ var (
6767
PublishTo: "meshery.meshsync.core",
6868
},
6969
// Istio Resources
70-
{
71-
Name: "virtualservices.v1beta1.networking.istio.io",
72-
PublishTo: "meshery.meshsync.istio",
73-
},
74-
{
75-
Name: "gateways.v1beta1.networking.istio.io",
76-
PublishTo: "meshery.meshsync.istio",
77-
},
78-
{
79-
Name: "destinationrules.v1beta1.networking.istio.io",
80-
PublishTo: "meshery.meshsync.istio",
81-
},
70+
// {
71+
// Name: "virtualservices.v1beta1.networking.istio.io",
72+
// PublishTo: "meshery.meshsync.istio",
73+
// },
74+
// {
75+
// Name: "gateways.v1beta1.networking.istio.io",
76+
// PublishTo: "meshery.meshsync.istio",
77+
// },
78+
// {
79+
// Name: "destinationrules.v1beta1.networking.istio.io",
80+
// PublishTo: "meshery.meshsync.istio",
81+
// },
8282
},
8383
}
8484

internal/pipeline/step.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ func newStartInformersStep(stopChan chan struct{}, log logger.Handler, informer
7272
}
7373

7474
func (si *StartInformers) Exec(request *pipeline.Request) *pipeline.Result {
75+
si.informer.WaitForCacheSync(si.stopChan)
7576
si.informer.Start(si.stopChan)
7677
return &pipeline.Result{
7778
Error: nil,

meshsync/handlers.go

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -61,15 +61,6 @@ func (h *Handler) ListenToRequests() {
6161

6262
// TODO: Add this to the broker pkg
6363
case "informer-store":
64-
65-
allInformersCacheSynced := true
66-
// checks if all the SharedInformers cache are synced atleast once
67-
for _, v := range h.informer.WaitForCacheSync(make(<-chan struct{})) {
68-
if !v {
69-
allInformersCacheSynced = false
70-
}
71-
}
72-
7364
d, err := utils.Marshal(request.Request.Payload)
7465
// TODO: Update broker pkg in Meshkit to include Reply types
7566
var payload struct{ Reply string }
@@ -83,19 +74,6 @@ func (h *Handler) ListenToRequests() {
8374
continue
8475
}
8576
replySubject := payload.Reply
86-
87-
if !allInformersCacheSynced {
88-
err = h.Broker.Publish(replySubject, &broker.Message{
89-
EventType: broker.ErrorEvent,
90-
Object: "Stores have not been synced. Please try again after sometime",
91-
})
92-
if err != nil {
93-
h.Log.Error(err)
94-
continue
95-
}
96-
continue
97-
}
98-
9977
storeObjects := h.listStoreObjects()
10078
splitSlices := splitIntoMultipleSlices(storeObjects, 5) // performance of NATS is bound to degrade if huge messages are sent
10179

0 commit comments

Comments
 (0)