Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data race fix in client #502

Merged
merged 6 commits into from
May 13, 2020

Conversation

slinkydeveloper
Copy link
Member

@slinkydeveloper slinkydeveloper commented May 13, 2020

There were two data races in client:

  • Using GetPort for getting the actual port was racy because another goroutine is starting the listening. GetPort now is renamed with GetListeningPort for clarity and the internal net.Listener is behind an atomic.Value
  • Trivial data race introduced by this PR Implemented parallelism in client polling #497

Enabled data race check in CI

Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
@slinkydeveloper
Copy link
Member Author

slinkydeveloper commented May 13, 2020

@n3wscott I disabled the pubsub test because it's preventing this pr to be merged. Since this fix is important, i propose to leave it disabled and fix in a follow up.

Do you have any input on why the pubsub test fail? On my machine they run smoothly, but CI doesn't like them, and doesn't log why https://circleci.com/gh/cloudevents/sdk-go/1138

@n3wscott
Copy link
Member

that is very weird. File an issue and we can give it to the pubsub maintainers to look at.

LGTM

@slinkydeveloper slinkydeveloper merged commit ca525ce into cloudevents:master May 13, 2020
@slinkydeveloper slinkydeveloper deleted the data_race branch May 13, 2020 14:34
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