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 pingbatcher 1720155 #7900

Merged
merged 3 commits into from
Oct 4, 2017
Merged

2.2 pingbatcher 1720155 #7900

merged 3 commits into from
Oct 4, 2017

Conversation

jameinel
Copy link
Member

@jameinel jameinel commented Oct 2, 2017

Description of change

It turns out that $bit operations do not work well with Upsert and Mongo 2.4. I had written the original patch against Mongo 2.6 which is why I thought everything worked, but it seems that things break if you use the 2.4 that we have on Trusty.

QA steps

The existing test suite would fail if run against Mongo 2.4 which should have caught this, but apparently were weren't actually running there? An easy way to test this is to grab a trusty VM/LXD container, and then 'apt install juju-mongodb' and run the test suite in state/presence.

Documentation changes

None

Bug reference

lp:1720155

When doing Upsert, it doesn't return an error, but it does say that no
documents were modified.
Mongo 2.4 appears to have a bug wrt Upsert and $bit operations.
See bug #1720155 and #1699678 for more details.
This does a Database version check and uses appropriate operations.
@nskaggs
Copy link
Contributor

nskaggs commented Oct 3, 2017

We'd planned on getting 2.6 into trusty, but it never happened. It seems we should consider restoring running on mongo2.4 and trusty, or restart the effort to move to mongo 2.6

if err != nil {
return errors.Trace(err)
}
// if changeInfo.Updated == 0 {
Copy link
Member

Choose a reason for hiding this comment

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

remove me?

Copy link
Member Author

Choose a reason for hiding this comment

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

done

@jameinel
Copy link
Member Author

jameinel commented Oct 4, 2017

$$merge$$

@jujubot
Copy link
Collaborator

jujubot commented Oct 4, 2017

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

@jujubot jujubot merged commit c1f373c into juju:2.2 Oct 4, 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
4 participants