Skip to content

Commit 3fb2ebb

Browse files
committed
Force sync on the insert
1 parent c98205d commit 3fb2ebb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/api/internal/edge/cluster_instances.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,13 +163,15 @@ func (d clusterSynchronizationStore) PoolInsert(ctx context.Context, item api.Cl
163163
ServiceVersion: item.ServiceVersion,
164164
ServiceVersionCommit: item.ServiceVersionCommit,
165165

166-
// initial values before first sync
167166
status: infogrpc.ServiceInfoStatus_Unhealthy,
168167
roles: make([]infogrpc.ServiceInfoRole, 0),
169168

170169
mutex: sync.RWMutex{},
171170
}
172171

172+
// Force sync to get initial values
173+
d.cluster.syncInstance(ctx, instance)
174+
173175
d.cluster.instances.Insert(item.NodeID, instance)
174176
}
175177

0 commit comments

Comments
 (0)