Fsync mongo so new lease queries are up to date #6330

Merged
merged 1 commit into from Sep 27, 2016

Conversation

Projects
None yet
3 participants
Contributor

reedobrien commented Sep 27, 2016

Mongo doesn't know about our clock implementation. So even though we've
advanced our clock we might not have waited for mongo to write the
changes to disk before asking for the expired leases and trying to
claim a new one.

I was able to reproduce this pretty easily within 100 or so runs. With
mgo.Session.Fsync I haven't triggered it within ~3000 runs.

Fixes https://bugs.launchpad.net/juju/+bug/1614256

QA: stress the test with methods described at: https://github.com/juju/juju/wiki/Debugging-Races

Fsync mongo so new lease queries are up to date
Mongo doesn't know about our clock implementation. So even though we've
advanced our clock we might not have waited for mongo to write the
changes to disk before asking for the expired leases and trying to
claim a new one.

I was able to reproduce this pretty easily within 100 or so runs. With
mgo.Session.Fsync I haven't triggered it within ~3000 runs.

Fixes https://bugs.launchpad.net/juju/+bug/1614256

LGreatTM!

Contributor

reedobrien commented Sep 27, 2016

$$merge$$

Contributor

jujubot commented Sep 27, 2016

Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju

@jujubot jujubot merged commit a5606e7 into juju:master Sep 27, 2016

@reedobrien reedobrien deleted the reedobrien:lp/1614256_TestClaimExpire-fail-leadership-claim-denied branch Sep 27, 2016

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