Skip to content

feat: Add RWMutex to Assertion to ensure safe concurrent map access(#…#1513

Closed
bugoutianzhen123 wants to merge 1 commit intoapache:masterfrom
bugoutianzhen123:issue1495other
Closed

feat: Add RWMutex to Assertion to ensure safe concurrent map access(#…#1513
bugoutianzhen123 wants to merge 1 commit intoapache:masterfrom
bugoutianzhen123:issue1495other

Conversation

@bugoutianzhen123
Copy link
Copy Markdown
Contributor

…1495)

@bugoutianzhen123
Copy link
Copy Markdown
Contributor Author

I was not able to reproduce the bug reported in issue #[1495].

However, I noticed that policyMap in Assertion may be accessed concurrently without proper synchronization.
To address this, I introduced a policyMu sync.RWMutex to Assertion to protect concurrent reads/writes, which also helps ensure data consistency to some extent.

@bugoutianzhen123 bugoutianzhen123 force-pushed the issue1495other branch 2 times, most recently from 4f51a35 to ee2a90b Compare August 7, 2025 15:47
@LarsArtmann
Copy link
Copy Markdown

LarsArtmann commented Aug 15, 2025

Do we have any Benchmarks for this?
I am new here, but it looks like this is a hot path.
I am worried that this could tank the performance.

@LarsArtmann
Copy link
Copy Markdown

Link/Related to: #1511

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants