{"action":"created","issue":{"url":"https://api.github.com/repos/DataDog/integrations-core/issues/836","repository_url":"https://api.github.com/repos/DataDog/integrations-core","labels_url":"https://api.github.com/repos/DataDog/integrations-core/issues/836/labels{/name}","comments_url":"https://api.github.com/repos/DataDog/integrations-core/issues/836/comments","events_url":"https://api.github.com/repos/DataDog/integrations-core/issues/836/events","html_url":"https://github.com/DataDog/integrations-core/pull/836","id":269937475,"number":836,"title":"Fixed mongo instance locking bug","user":{"login":"ISauve","id":11351618,"avatar_url":"https://avatars3.githubusercontent.com/u/11351618?v=4","gravatar_id":"","url":"https://api.github.com/users/ISauve","html_url":"https://github.com/ISauve","followers_url":"https://api.github.com/users/ISauve/followers","following_url":"https://api.github.com/users/ISauve/following{/other_user}","gists_url":"https://api.github.com/users/ISauve/gists{/gist_id}","starred_url":"https://api.github.com/users/ISauve/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ISauve/subscriptions","organizations_url":"https://api.github.com/users/ISauve/orgs","repos_url":"https://api.github.com/users/ISauve/repos","events_url":"https://api.github.com/users/ISauve/events{/privacy}","received_events_url":"https://api.github.com/users/ISauve/received_events","type":"User","site_admin":false},"labels":[{"id":293952856,"url":"https://api.github.com/repos/DataDog/integrations-core/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-10-31T12:18:27Z","updated_at":"2017-11-02T13:33:34Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/DataDog/integrations-core/pulls/836","html_url":"https://github.com/DataDog/integrations-core/pull/836","diff_url":"https://github.com/DataDog/integrations-core/pull/836.diff","patch_url":"https://github.com/DataDog/integrations-core/pull/836.patch"},"body":"<!-- *Note: Please remember to review the Datadog [Contribution Guidelines](https://github.com/DataDog/dd-agent/blob/master/CONTRIBUTING.md)\r\nif you have not yet done so.* -->\r\n\r\n### What does this PR do?\r\n\r\nWe currently use PyMongo's `database_names()` command to fetch the names of all the databases; this in turn uses MongoDB's `listDatabases` command. For Mongo versions >= 3.2, the command supports an additional field `nameOnly` which returns only the names of the databases and does not require database locks ( [documentation](https://docs.mongodb.com/v3.2/reference/command/listDatabases/) ). PyMongo does not currently support this option, but the next version is supposed to, so this is just a temporary workaround until that version is released ( [PyMongo changelog](https://github.com/mongodb/mongo-python-driver/blob/master/doc/changelog.rst) ).\r\n\r\nThis PR checks which version of Mongo the user is running and calls the `listDatabases` command directly, using the `nameOnly` field if the version is high enough.\r\n\r\n### Motivation\r\n\r\nhttps://github.com/DataDog/integrations-core/issues/606\r\n\r\n### Testing Guidelines\r\n\r\nAn overview on [testing](https://github.com/DataDog/dd-agent/blob/master/tests/README.md)\r\nis available in our contribution guidelines.\r\n\r\n### Versioning\r\n\r\n- [x] Bumped the version check in `manifest.json`\r\n- [x] Updated `CHANGELOG.md`. Please use `Unreleased` as the date in the title\r\n  for the new section.\r\n\r\n### Additional Notes\r\n\r\nAnything else we should know when reviewing?\r\n"},"comment":{"url":"https://api.github.com/repos/DataDog/integrations-core/issues/comments/341421885","html_url":"https://github.com/DataDog/integrations-core/pull/836#issuecomment-341421885","issue_url":"https://api.github.com/repos/DataDog/integrations-core/issues/836","id":341421885,"user":{"login":"ISauve","id":11351618,"avatar_url":"https://avatars3.githubusercontent.com/u/11351618?v=4","gravatar_id":"","url":"https://api.github.com/users/ISauve","html_url":"https://github.com/ISauve","followers_url":"https://api.github.com/users/ISauve/followers","following_url":"https://api.github.com/users/ISauve/following{/other_user}","gists_url":"https://api.github.com/users/ISauve/gists{/gist_id}","starred_url":"https://api.github.com/users/ISauve/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ISauve/subscriptions","organizations_url":"https://api.github.com/users/ISauve/orgs","repos_url":"https://api.github.com/users/ISauve/repos","events_url":"https://api.github.com/users/ISauve/events{/privacy}","received_events_url":"https://api.github.com/users/ISauve/received_events","type":"User","site_admin":false},"created_at":"2017-11-02T13:33:34Z","updated_at":"2017-11-02T13:33:34Z","author_association":"CONTRIBUTOR","body":"PyMongo 3.5 already contains a fix for this issue - no need to wait for the next version to come out. This problem is fixed by https://github.com/DataDog/integrations-core/pull/747"}}
{"actor":{"display_login":"ISauve"}}