coinbase / mesh-sdk-go

Mesh Client Go SDK
Apache License 2.0
196 stars 135 forks source link

fix: add sync.RWMutex to headerforwarder map #511

Closed potterbm-cb closed 16 hours ago

potterbm-cb commented 19 hours ago

Motivation

This utility was part of a proof-of-concept and this is an attempt to move it closer to a production-ready state

Solution

Header forwarder was failing with fatal error: concurrent map writes when under heavy load. This change adds a read/write aware locking mechanism to prevent concurrent writes (concurrent reads will not block unless there is a write happening)

cb-heimdall commented 19 hours ago

✅ Heimdall Review Status

Requirement Status More Info
Reviews 1/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1