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

Fix data races. #2287

Merged
merged 2 commits into from
Jan 15, 2018
Merged

Fix data races. #2287

merged 2 commits into from
Jan 15, 2018

Conversation

tcolgate
Copy link
Contributor

This fixes a race between dumping the config and setting up the stats.

@tcolgate
Copy link
Contributor Author

With these changes, test-unit passes.

@tcolgate
Copy link
Contributor Author

test-integration still fails, something to do with use of a buffer. Still investigating.

build.Dockerfile Outdated
@@ -1,8 +1,11 @@
FROM golang:1.9-alpine
FROM golang:1.9
Copy link
Member

Choose a reason for hiding this comment

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

Why did you change this ?

@tcolgate
Copy link
Contributor Author

tcolgate commented Oct 20, 2017 via email

@tcolgate
Copy link
Contributor Author

@emilevauge I've pushed what I have. I can't get the integration tests passing locally. The consul_catalogue tests pass, but whatever comes next hangs and it's not obvious from the timeout where. There may be a better approach that the Pipe for getting the output (the original approach requires locking around the buffer though, the Pipe seems cleaner).
I'm not going to have much time to work on this. FWIW, I think the race in the integration tests appears to be purely to do with the test harness.
If we can't see an obvious solution to the integration tests, I'd suggest at least meging the Web.Stats and healthcheck patches, since those are genuine races.

@ldez ldez added the kind/bug/fix a bug fix label Oct 26, 2017
@tcolgate
Copy link
Contributor Author

I've started making a bit more progress, but there are still a lot of failing tests. staert seems to have an actual issues, ConsulSuite.TestDatastore is the main sticking point right now.

@emilevauge
Copy link
Member

@tcolgate I think it would be better to split this PR into 2: fixes on code and fixes on tests. It would help merging more quickly code races. WDYT?

@tcolgate tcolgate requested review from a team as code owners November 3, 2017 17:56
@tcolgate
Copy link
Contributor Author

tcolgate commented Nov 3, 2017

@emilevauge I'll leave this branch for critical fixes then, and open another PR with the test fixes.

@timoreimann
Copy link
Contributor

Shouldn't the PR come with a slight change to our build process, namely the activation of the race detector? At least temporarily so that we can see if race detector-enabled builds succeed now?

@tcolgate
Copy link
Contributor Author

tcolgate commented Nov 4, 2017 via email

@timoreimann
Copy link
Contributor

That sounds reasonable to me.

@ldez
Copy link
Contributor

ldez commented Jan 11, 2018

@tcolgate Could you rebase on 1.5 ?

@ldez ldez added this to the 1.5 milestone Jan 15, 2018
This fixes a race between dumping the config and setting up the stats.
@ldez ldez changed the base branch from v1.4 to v1.5 January 15, 2018 10:11
@ldez ldez removed the bot/no-merge label Jan 15, 2018
Copy link
Member

@mmatur mmatur left a comment

Choose a reason for hiding this comment

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

LGTM

@emilevauge
Copy link
Member

@tcolgate we rebased your PR and kept your fixes on Stats & heathchecks.

Copy link
Member

@juliens juliens left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@ldez ldez left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants