fix: introduced RWMutex to flag state to prevent concurrent r/w of map#370
fix: introduced RWMutex to flag state to prevent concurrent r/w of map#370toddbaert merged 2 commits intoopen-feature:mainfrom
Conversation
Signed-off-by: Skye Gill <gill.skye95@gmail.com>
|
I reviewed the change. This is fine for the current implementation. However, we have to use two mutexes that protect the same underlying data structure (Flags backed by the Map). IMO, this shows we need to improve the contract between I see we need to isolate Flags to a This will be a big refactoring and will require some changes. But it will help us with maintaining, debugging and adding new features in the future (ex:- changing the What do you think? |
toddbaert
left a comment
There was a problem hiding this comment.
I agree with @Kavindu-Dodan that we should open a new issue to improve some of these abstractions, but we should merge this to fix the bug.
Let's focus on this improvement through #371 |
🤖 I have created a release *beep* *boop* --- ## [0.3.5](v0.3.4...v0.3.5) (2023-02-06) ### Features * flagd image signing ([#338](#338)) ([eca6a60](eca6a60)) * update in logging to console and Unify case usage, seperators and punctuation for logging ([#322](#322)) ([0bdcfd2](0bdcfd2)) ### Bug Fixes * **deps:** update module github.com/bufbuild/connect-go to v1.5.1 ([#365](#365)) ([e25f452](e25f452)) * **deps:** update module github.com/open-feature/open-feature-operator to v0.2.28 ([#342](#342)) ([e6df80f](e6df80f)) * **deps:** update module sigs.k8s.io/controller-runtime to v0.14.2 ([#336](#336)) ([836d3cf](836d3cf)) * **deps:** update module sigs.k8s.io/controller-runtime to v0.14.3 ([#372](#372)) ([330ac91](330ac91)) * **deps:** update module sigs.k8s.io/controller-runtime to v0.14.4 ([#374](#374)) ([d90e561](d90e561)) * fix unbuffered channel blocking goroutine ([#358](#358)) ([4f1905a](4f1905a)) * introduced RWMutex to flag state to prevent concurrent r/w of map ([#370](#370)) ([93e356b](93e356b)) * use event.Has func for file change notification handling (increased stability across OS) ([#361](#361)) ([09f74b9](09f74b9)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…v7 (open-feature#370) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

This PR
Related Issues
Fixes #368
Notes
Follow-up Tasks
How to test