From 537d2ec1ad846898f820874442c3f69915096bad Mon Sep 17 00:00:00 2001 From: Matthew Pendrey Date: Tue, 6 Aug 2024 18:08:44 +0100 Subject: [PATCH] fix data race in syncer/launcher (#14050) --- .changeset/twelve-balloons-turn.md | 5 +++++ core/capabilities/registry.go | 2 ++ 2 files changed, 7 insertions(+) create mode 100644 .changeset/twelve-balloons-turn.md diff --git a/.changeset/twelve-balloons-turn.md b/.changeset/twelve-balloons-turn.md new file mode 100644 index 00000000000..f4f0e2670e9 --- /dev/null +++ b/.changeset/twelve-balloons-turn.md @@ -0,0 +1,5 @@ +--- +"chainlink": patch +--- + +#internal fix data race in syncer launcher diff --git a/core/capabilities/registry.go b/core/capabilities/registry.go index 8a99450c096..d6891c81ab9 100644 --- a/core/capabilities/registry.go +++ b/core/capabilities/registry.go @@ -37,6 +37,8 @@ func (r *Registry) LocalNode(ctx context.Context) (capabilities.Node, error) { } func (r *Registry) ConfigForCapability(ctx context.Context, capabilityID string, donID uint32) (capabilities.CapabilityConfiguration, error) { + r.mu.RLock() + defer r.mu.RUnlock() if r.metadataRegistry == nil { return capabilities.CapabilityConfiguration{}, errors.New("metadataRegistry information not available") }