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

2.2 into develop #7868

Merged
merged 7 commits into from
Sep 21, 2017
Merged

2.2 into develop #7868

merged 7 commits into from
Sep 21, 2017

Conversation

jameinel
Copy link
Member

Description of change

This brings 2.2 tip back into develop. Mostly bringing in the PingBatcher changes.

Veebers and others added 7 commits September 12, 2017 13:01
CI: Merge acceptance tests changes from develop.

This merges the acceptancetests changes that happened in develop branch.

This is needed as we will be doing in-tree testing in the very near future.
This addresses both bug #1699678 (use bit set operations) and bug

We switch from using bulk.Run() which doesn't handle E11000 to just
directly calling collection.Upsert() which automatically handles Upsert
duplicate key failures. We also ensure it is absolutely safe to retry by
switching from $inc operations to using $bit...or operations.

Tests still pass. I tried writing a test that would trigger the issue,
but even with 1000 concurrent PingBatcher I could not get them to
race against Mongo. In the field it seems to only happen when mongo
is starting to fail under load for other reasons.
…99678

Switch to directly bit setting instead of $inc for PingBatcher.

## Description of change

This addresses both bug #1699678 (use bit set operations) and bug #1703675 (handle upsert failing with duplicate keys).

We switch from using bulk.Run() which doesn't handle E11000 to just
directly calling collection.Upsert() which automatically handles Upsert
duplicate key failures. We also ensure it is absolutely safe to retry by
switching from $inc operations to using $bit...or operations.

Tests still pass. I tried writing a test that would trigger the issue,
but even with 1000 concurrent PingBatcher I could not get them to
race against Mongo. In the field it seems to only happen when mongo
is starting to fail under load for other reasons.

Also addresses bug #1718340 which is just that we were passing a lot of empty document IDs to a query.

## QA steps

Run an HA controller. Trigger a lot of load on the controller, and you should not see errors and PingBatcher getting restarted.

## Documentation changes

No

## Bug reference

[lp:1703675](https://bugs.launchpad.net/juju/+bug/1703675)
[lp:1699678](https://bugs.launchpad.net/juju/+bug/1699678)
[lp:1718340](https://bugs.launchpad.net/juju/+bug/1718340)
@jameinel
Copy link
Member Author

$$merge$$ self approving an merge from 2.2 into develop

@jujubot
Copy link
Collaborator

jujubot commented Sep 21, 2017

Status: merge request accepted. Url: http://ci.jujucharms.com/job/github-merge-juju

@jujubot jujubot merged commit 774f2f0 into juju:develop Sep 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants