summaryrefslogtreecommitdiff
path: root/src/mongo/s
diff options
context:
space:
mode:
authorEsha Maharishi <esha.maharishi@mongodb.com>2017-01-10 12:04:22 -0500
committerEsha Maharishi <esha.maharishi@mongodb.com>2017-01-11 11:07:22 -0500
commit5998e8cde81d850e6b1bbd9156ed7d3223e6cd51 (patch)
tree233854d3204649b55e4709809ac13e777858f32e /src/mongo/s
parent0ecb8a16579c070aa0b021420f490336d7bf6db4 (diff)
downloadmongo-5998e8cde81d850e6b1bbd9156ed7d3223e6cd51.tar.gz
SERVER-27613 do not send chunk's ChunkVersion in split requests
Diffstat (limited to 'src/mongo/s')
-rw-r--r--src/mongo/s/chunk.cpp1
-rw-r--r--src/mongo/s/commands/cluster_shard_collection_cmd.cpp1
-rw-r--r--src/mongo/s/commands/cluster_split_cmd.cpp1
-rw-r--r--src/mongo/s/shard_util.cpp3
-rw-r--r--src/mongo/s/shard_util.h2
5 files changed, 0 insertions, 8 deletions
diff --git a/src/mongo/s/chunk.cpp b/src/mongo/s/chunk.cpp
index cc1750ff074..5f33238b24b 100644
--- a/src/mongo/s/chunk.cpp
+++ b/src/mongo/s/chunk.cpp
@@ -296,7 +296,6 @@ StatusWith<boost::optional<ChunkRange>> Chunk::split(OperationContext* txn,
_manager->getVersion(),
_min,
_max,
- getLastmod(),
splitPoints);
if (!splitStatus.isOK()) {
return splitStatus.getStatus();
diff --git a/src/mongo/s/commands/cluster_shard_collection_cmd.cpp b/src/mongo/s/commands/cluster_shard_collection_cmd.cpp
index 2d2283382f1..d0555c02664 100644
--- a/src/mongo/s/commands/cluster_shard_collection_cmd.cpp
+++ b/src/mongo/s/commands/cluster_shard_collection_cmd.cpp
@@ -602,7 +602,6 @@ public:
chunkManager->getVersion(),
currentChunk->getMin(),
currentChunk->getMax(),
- currentChunk->getLastmod(),
subSplits);
if (!splitStatus.isOK()) {
warning() << "couldn't split chunk " << redact(currentChunk->toString())
diff --git a/src/mongo/s/commands/cluster_split_cmd.cpp b/src/mongo/s/commands/cluster_split_cmd.cpp
index 489b256c696..750020c1168 100644
--- a/src/mongo/s/commands/cluster_split_cmd.cpp
+++ b/src/mongo/s/commands/cluster_split_cmd.cpp
@@ -234,7 +234,6 @@ public:
cm->getVersion(),
chunk->getMin(),
chunk->getMax(),
- chunk->getLastmod(),
{middle}));
}
diff --git a/src/mongo/s/shard_util.cpp b/src/mongo/s/shard_util.cpp
index e834f77e743..ff5ecba7442 100644
--- a/src/mongo/s/shard_util.cpp
+++ b/src/mongo/s/shard_util.cpp
@@ -49,7 +49,6 @@ namespace {
const char kMinKey[] = "min";
const char kMaxKey[] = "max";
-const char kChunkVersion[] = "chunkVersion";
const char kShouldMigrate[] = "shouldMigrate";
} // namespace
@@ -178,7 +177,6 @@ StatusWith<boost::optional<ChunkRange>> splitChunkAtMultiplePoints(
ChunkVersion collectionVersion,
const BSONObj& minKey,
const BSONObj& maxKey,
- ChunkVersion chunkVersion,
const std::vector<BSONObj>& splitPoints) {
invariant(!splitPoints.empty());
invariant(minKey.woCompare(maxKey) < 0);
@@ -200,7 +198,6 @@ StatusWith<boost::optional<ChunkRange>> splitChunkAtMultiplePoints(
collectionVersion.appendForCommands(&cmd);
cmd.append(kMinKey, minKey);
cmd.append(kMaxKey, maxKey);
- chunkVersion.appendWithFieldForCommands(&cmd, kChunkVersion);
cmd.append("splitKeys", splitPoints);
BSONObj cmdObj = cmd.obj();
diff --git a/src/mongo/s/shard_util.h b/src/mongo/s/shard_util.h
index a84ed72ccd7..2edc7025db4 100644
--- a/src/mongo/s/shard_util.h
+++ b/src/mongo/s/shard_util.h
@@ -102,7 +102,6 @@ StatusWith<std::vector<BSONObj>> selectChunkSplitPoints(OperationContext* txn,
* shardKeyPattern The shard key which corresponds to this sharded namespace.
* collectionVersion The expected collection version when doing the split.
* minKey/maxKey Bounds of the chunk to be split.
- * chunkVersion Expected version of the chunk, which is being modified.
* splitPoints The set of points at which the chunk should be split.
*/
StatusWith<boost::optional<ChunkRange>> splitChunkAtMultiplePoints(
@@ -113,7 +112,6 @@ StatusWith<boost::optional<ChunkRange>> splitChunkAtMultiplePoints(
ChunkVersion collectionVersion,
const BSONObj& minKey,
const BSONObj& maxKey,
- ChunkVersion chunkVersion,
const std::vector<BSONObj>& splitPoints);
} // namespace shardutil