[mongo] Use db.current_op instead of manually querying#3016
Merged
Conversation
MongoDB 3.2 introduced a new find command, which standard query operations in pymongo will use if it's available. That command doesn't support the legacy `$cmd.sys.inprog` pseudo-collection, which is replaced by a `currentOp` command. Fortunately there's a built-in API to handle this. Use it.
Contributor
Author
|
Ha! Looks like I just missed that one. Sorry about that, rebased now. |
|
Thank you! 🙇 |
Member
|
Tests are actually running and passing, merging |
truthbk
pushed a commit
that referenced
this pull request
Nov 15, 2016
MongoDB 3.2 introduced a new find command, which standard query operations in pymongo will use if it's available. That command doesn't support the legacy `$cmd.sys.inprog` pseudo-collection, which is replaced by a `currentOp` command. Fortunately there's a built-in API to handle this. Use it.
|
Thanks @ebroder |
degemer
added a commit
that referenced
this pull request
Nov 15, 2016
* master: (254 commits) Reduce the maximum amount of argument to pylint. [forwarder] stop flushing after 10s [etcd] Report errors connecting to etcd endpoint (#3007) Postfix check should pass raise_on_empty_output=False [status] Silence requests exception [psutil] Only set `psutil.PROCFS_PATH` once in the collector (#3013) [ci] fix check name detection of test files (#3021) [ci][rabbitmq] Increase wait timeout (#3022) [core] SpooledTemporaryFile for subprocess output (#3002) [collector] isolate system checks (#3001) [ci] Fix Travis jobs timing out (#3017) [mongo] Use db.current_op instead of manually querying (#3016) [ci] fix bad citizens detection (#3020) [ci] add debug logs (#3019) [mongo] use `currentOp` for mongodb 3.2+ Use proxy for API key check in info page (#3012) [mongo] Add MongoDB 3.2 support [mongo] Add MongoDB 3.2 to travis-ci config [packaging] 5.11.0 nightlies (#3009) [core] hard-deprecate start/stop/restart/status (#3004) ...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
MongoDB 3.2 introduced a new find command, which standard query
operations in pymongo will use if it's available. That command doesn't
support the legacy
$cmd.sys.inprogpseudo-collection, which isreplaced by a
currentOpcommand.Fortunately there's a built-in API to handle this. Use it.
Motivation
Based on f6b0742#commitcomment-19773690, this is currently broken under newer versions of MongoDB.
Testing Guidelines
An overview on testing
is available in our contribution guidelines.
Additional Notes
Anything else we should know when reviewing?