You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cluster_id is vulnerable to race condition when called concurrently (#94)
* fix(cluster_id): Get() is "insert if not exist", needs read-write lock protection
* fix(jobs): remove static clusterID getter in sendVersionsImpl
1) add generic data.ClusterID type in sendVersions type struct
2) enable common clusterID reference to be included in multiple, concurrent jobs, so that appropriate locking can be enforced
Copy file name to clipboardexpand all lines: jobs/jobs.go
+6-2
Original file line number
Diff line number
Diff line change
@@ -22,6 +22,7 @@ type Periodic interface {
22
22
// SendVersions fulfills the Periodic interface
23
23
typesendVersionsstruct {
24
24
k8sResources*k8s.ResourceInterfaceNamespaced
25
+
clusterID data.ClusterID
25
26
apiClient*apiclient.WorkflowManager
26
27
availableVersions data.AvailableVersions
27
28
frequency time.Duration
@@ -30,12 +31,14 @@ type sendVersions struct {
30
31
// NewSendVersionsPeriodic creates a new SendVersions using sgc and rcl as the the secret getter / creator and replication controller lister implementations (respectively)
0 commit comments