Skip to content

Commit 5fbe29c

Browse files
authored
Revert "OCPBUGS-52848: Revert "OCPBUGS-45049: Adding mutex to func createSamples on handler.go""
1 parent 9be05e7 commit 5fbe29c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pkg/stub/handler.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1151,6 +1151,8 @@ func (h *Handler) abortForDelete(cfg *v1.Config) bool {
11511151
func (h *Handler) createSamples(cfg *v1.Config, updateIfPresent, registryChanged bool, unskippedStreams, unskippedTemplates map[string]bool) (bool, error) {
11521152
// first, got through the list and prime our upsert cache
11531153
// prior to any actual upserts
1154+
h.mapsMutex.Lock()
1155+
defer h.mapsMutex.Unlock()
11541156
imagestreams := []*imagev1.ImageStream{}
11551157
for _, fileName := range h.imagestreamFile {
11561158
if h.abortForDelete(cfg) {

0 commit comments

Comments
 (0)