diff options
author | Cheahuychou Mao <mao.cheahuychou@gmail.com> | 2021-02-17 02:46:11 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-02-17 15:42:16 +0000 |
commit | 2863ffba5cfe923c0e0661bc7a1b9d916c696b27 (patch) | |
tree | fbabe7a7ffd773db3f40890ef2c45a6f76233fec | |
parent | 0f7281ffd6bf5f700ff9d0f6163beccf6803a58a (diff) | |
download | mongo-2863ffba5cfe923c0e0661bc7a1b9d916c696b27.tar.gz |
SERVER-50017 Remove unused parameters in getShardVersion response
-rw-r--r-- | jstests/sharding/version1.js | 2 | ||||
-rw-r--r-- | jstests/sharding/version2.js | 5 | ||||
-rw-r--r-- | src/mongo/db/s/get_shard_version_command.cpp | 5 |
3 files changed, 0 insertions, 12 deletions
diff --git a/jstests/sharding/version1.js b/jstests/sharding/version1.js index c03de0b2040..5ba8456c81d 100644 --- a/jstests/sharding/version1.js +++ b/jstests/sharding/version1.js @@ -80,8 +80,6 @@ assert.commandFailed(a.runCommand({ // assert.eq( a.runCommand( { "setShardVersion" : "alleyinsider.foo" , configdb : s._configDB , // version : 3 } ).oldVersion.i , 2 , "oldVersion" ); -// assert.eq( a.runCommand( { "getShardVersion" : "alleyinsider.foo" } ).mine.i , 3 , "my get -// version A" ); // assert.eq( a.runCommand( { "getShardVersion" : "alleyinsider.foo" } ).global.i , 3 , "my get // version B" ); diff --git a/jstests/sharding/version2.js b/jstests/sharding/version2.js index 0e2be7375d9..034fb555830 100644 --- a/jstests/sharding/version2.js +++ b/jstests/sharding/version2.js @@ -16,7 +16,6 @@ assert.commandWorked(s.s0.adminCommand({shardcollection: "alleyinsider.bar", key var a = s.shard0.getDB("admin"); // Setup from one client -assert.eq(a.runCommand({"getShardVersion": "alleyinsider.foo", configdb: s._configDB}).mine.i, 0); assert.eq(a.runCommand({"getShardVersion": "alleyinsider.foo", configdb: s._configDB}).global.i, 0); var fooEpoch = findChunksUtil.findOneChunkByNs(s.getDB('config'), 'alleyinsider.foo').lastmodEpoch; @@ -32,7 +31,6 @@ assert.commandWorked(a.runCommand({ printjson(s.config.chunks.findOne()); -assert.eq(a.runCommand({"getShardVersion": "alleyinsider.foo", configdb: s._configDB}).mine.t, 0); assert.eq(a.runCommand({"getShardVersion": "alleyinsider.foo", configdb: s._configDB}).global.t, 1); // From a different client @@ -41,9 +39,6 @@ var a2 = connect(`mongodb://${s.rs0.getPrimary().name}/admin`); assert.eq(a2.runCommand({"getShardVersion": "alleyinsider.foo", configdb: s._configDB}).global.t, 1, "a2 global 1"); -assert.eq(a2.runCommand({"getShardVersion": "alleyinsider.foo", configdb: s._configDB}).mine.i, - 0, - "a2 mine 1"); s.stop(); })(); diff --git a/src/mongo/db/s/get_shard_version_command.cpp b/src/mongo/db/s/get_shard_version_command.cpp index 6d938f5fa9c..ceb80ea28e0 100644 --- a/src/mongo/db/s/get_shard_version_command.cpp +++ b/src/mongo/db/s/get_shard_version_command.cpp @@ -92,11 +92,6 @@ public: "configServer", Grid::get(opCtx)->shardRegistry()->getConfigServerConnectionString().toString()); - // TODO SERVER-50017: Legacy boolean related to sharded connections. To remove when 5.0 - // becomes last-lts. - result.appendBool("inShardedMode", false); - result.appendTimestamp("mine", 0); - AutoGetCollection autoColl(opCtx, nss, MODE_IS, AutoGetCollectionViewMode::kViewsPermitted); auto* const csr = CollectionShardingRuntime::get(opCtx, nss); |