You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Possible race condition in creating a server & updating backends.
Timeline
Create a server&start it
This eventually calls start in discovery.go
In discovery.go, if we are using a backend with 0 timeout such as static files we set create a go routine that will set the initial backend list and exit.
However since this is in a go routine, the initial write could be delayed till after someone programatically called UpdateBackends. The updates would race with the last writer winning.
This is a bug if the UpdateBackends wins, and the initial value succeeds. This race does not exist after initial set, due to all UpdateBackends pushing into the channel synchronously.
@yyyar I accidentally referenced this issue in pr #261 . However it was related to a different issue with the word race in it. This one should stay active till atleast #258 is merged (if not longer). I do not like that 258 still requires non obvious cooperations from the calling client.
Possible race condition in creating a server & updating backends.
Timeline
gobetween/src/discovery/discovery.go
Lines 94 to 144 in 7d8a736
The text was updated successfully, but these errors were encountered: