This repository has been archived by the owner on Dec 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
A possible concurrent access to "idToReplicaset" map #36
Labels
good first issue
Good for newcomers
Comments
nurzhan-saktaganov
added a commit
that referenced
this issue
Aug 16, 2024
* make the idToReplicaset map immutable by convention * instead, we create an entirely new object instead of updating the old one
nurzhan-saktaganov
added a commit
that referenced
this issue
Aug 26, 2024
* make the idToReplicaset map immutable by convention * instead, we create an entirely new object instead of updating the old one
nurzhan-saktaganov
added a commit
that referenced
this issue
Aug 26, 2024
* make the idToReplicaset map immutable by convention * instead, we create an entirely new object instead of updating the old one * update CHANGELOG.md
nurzhan-saktaganov
added a commit
that referenced
this issue
Aug 26, 2024
* make the idToReplicaset map immutable by convention * instead, we create an entirely new object instead of updating the old one * update CHANGELOG.md
nurzhan-saktaganov
added a commit
that referenced
this issue
Aug 26, 2024
* make the idToReplicaset map immutable by convention * instead, we create an entirely new object instead of updating the old one * update CHANGELOG.md
nurzhan-saktaganov
added a commit
that referenced
this issue
Aug 26, 2024
* make the idToReplicaset map immutable by convention we create an entirely new object instead of updating the old one * remove proxy object 'struct controller' * update CHANGELOG.md
nurzhan-saktaganov
added a commit
that referenced
this issue
Aug 26, 2024
* make the idToReplicaset map immutable by convention we create an entirely new object instead of updating the old one * remove proxy object 'struct controller' * update CHANGELOG.md
Merged
KaymeKaydex
pushed a commit
that referenced
this issue
Aug 30, 2024
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Case 1
We expose an original map
idToReplicaset
via theRouterRouteAll
method. Nothing prevents a caller from modifying this map.Case 2
An external topology provider has indirect access to this map via
TopologyController
. No sync primitive is used to restrict concurrent access (rw).As a possible solution, we should not modify idToReplicaset at all (make maps immutable by convention). Just create an entirely new map whenever we need to change the current topology. Additionally, we have to guard the
idToReplicaset
variable using someRWMutex
.@KaymeKaydex I will come up with a Merge Request later if you don't mind.
The basic idea:
The text was updated successfully, but these errors were encountered: