summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Storch <david.storch@mongodb.com>2022-08-22 14:39:54 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-08-22 16:07:53 +0000
commitb324e20468ca7d2c3afd3cfa57f1ba38c77a3655 (patch)
tree0d4f172ade1df5416bb2475cc60f97e948928724
parentc7da70b78f234eab15f1188a887fc3139d65f5ac (diff)
downloadmongo-b324e20468ca7d2c3afd3cfa57f1ba38c77a3655.tar.gz
SERVER-67127 Delete 'db.currentOpLegacy()' helper
-rw-r--r--jstests/sharding/change_stream_update_lookup_read_concern.js4
-rw-r--r--src/mongo/shell/db.js22
2 files changed, 2 insertions, 24 deletions
diff --git a/jstests/sharding/change_stream_update_lookup_read_concern.js b/jstests/sharding/change_stream_update_lookup_read_concern.js
index a94f4e82f23..95e5bcd9f58 100644
--- a/jstests/sharding/change_stream_update_lookup_read_concern.js
+++ b/jstests/sharding/change_stream_update_lookup_read_concern.js
@@ -187,7 +187,7 @@ const joinResumeReplicationShell =
assert.soon(
function() {
return changeStreamDB
- .currentOpLegacy({
+ .currentOp({
op: "command",
// Note the namespace here happens to be database.$cmd, because
// we're blocked waiting for the read concern, which happens
@@ -199,7 +199,7 @@ const joinResumeReplicationShell =
.inprog.length === 1;
},
() => "Failed to find update lookup in currentOp(): " +
- tojson(changeStreamDB.currentOpLegacy().inprog));
+ tojson(changeStreamDB.currentOp().inprog));
// Then restart replication - this should eventually unblock the lookup.
restartServerReplication(pausedSecondary);`,
diff --git a/src/mongo/shell/db.js b/src/mongo/shell/db.js
index 0d55b6baa45..3f92ed285fc 100644
--- a/src/mongo/shell/db.js
+++ b/src/mongo/shell/db.js
@@ -801,13 +801,6 @@ DB.prototype.hello = function() {
};
DB.prototype.currentOp = function(arg) {
- // TODO CLOUDP-89361: The shell is connected to the Atlas Proxy, which currently does not
- // support the $currentOp aggregation stage. Remove the legacy server command path once the
- // proxy can support $currentOp.
- if (this.serverStatus().hasOwnProperty("atlasVersion")) {
- return this.currentOpLegacy(arg);
- }
-
try {
const results = this.currentOpCursor(arg).toArray();
let res = {"inprog": results.length > 0 ? results : [], "ok": 1};
@@ -822,21 +815,6 @@ DB.prototype.currentOp = function(arg) {
return {"ok": 0, "code": e.code, "errmsg": "Error executing $currentOp: " + e.message};
}
};
-DB.prototype.currentOP = DB.prototype.currentOp;
-
-DB.prototype.currentOpLegacy = function(arg) {
- let q = {};
- if (arg) {
- if (typeof (arg) == "object")
- Object.extend(q, arg);
- else if (arg)
- q["$all"] = true;
- }
-
- var commandObj = {"currentOp": 1};
- Object.extend(commandObj, q);
- return this.adminCommand(commandObj);
-};
DB.prototype.currentOpCursor = function(arg) {
let q = {};