Skip to content

fix: don't hold lock when calling listeners#12

Merged
ndyakov merged 4 commits intomainfrom
ndyakov/fix-11
Sep 11, 2025
Merged

fix: don't hold lock when calling listeners#12
ndyakov merged 4 commits intomainfrom
ndyakov/fix-11

Conversation

@ndyakov
Copy link
Copy Markdown
Member

@ndyakov ndyakov commented Sep 11, 2025

Fixes #11

@ndyakov ndyakov added the bug Something isn't working label Sep 11, 2025
Copy link
Copy Markdown

@htemelski-oss htemelski-oss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me
Is there an easy way to replicate the issue in a test?

@ndyakov
Copy link
Copy Markdown
Member Author

ndyakov commented Sep 11, 2025

@htemelski-redis I added a test and fixed the potential data race

@ndyakov ndyakov self-assigned this Sep 11, 2025
@github-actions
Copy link
Copy Markdown

Merging this branch will increase overall coverage

Impacted Packages Coverage Δ 🤖
github.com/redis/go-redis-entraid 96.81% (+3.48%) 👍

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/redis/go-redis-entraid/credentials_provider.go 96.36% (+6.17%) 55 (+4) 53 (+7) 2 (-3) 👍

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

Changed unit test files

  • github.com/redis/go-redis-entraid/credentials_provider_test.go

@ndyakov ndyakov merged commit fe11795 into main Sep 11, 2025
4 checks passed
@ndyakov ndyakov deleted the ndyakov/fix-11 branch January 15, 2026 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Deadlock in StreamingCredentialsProvider: calling listeners under RWMutex while go-redis unsubscribes on re-auth failure

2 participants