summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRandolph Tan <randolph@10gen.com>2020-04-08 16:17:18 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-04-13 20:49:38 +0000
commitc58d35e8b8cd53875a4296e5e70070e2667194d9 (patch)
tree6ed4ab00795df393ca4d43f411f89b6b7d039dc7
parente95c1625acdaed28ddb9ebda5c293e307e8ee284 (diff)
downloadmongo-c58d35e8b8cd53875a4296e5e70070e2667194d9.tar.gz
SERVER-40187 Remove waitsForNewOplog response field from _getNextSessionMods
-rw-r--r--src/mongo/db/s/migration_chunk_cloner_source_legacy_commands.cpp5
-rw-r--r--src/mongo/db/s/session_catalog_migration_destination.cpp11
2 files changed, 0 insertions, 16 deletions
diff --git a/src/mongo/db/s/migration_chunk_cloner_source_legacy_commands.cpp b/src/mongo/db/s/migration_chunk_cloner_source_legacy_commands.cpp
index f7e325bfafc..321d9803a2a 100644
--- a/src/mongo/db/s/migration_chunk_cloner_source_legacy_commands.cpp
+++ b/src/mongo/db/s/migration_chunk_cloner_source_legacy_commands.cpp
@@ -348,11 +348,6 @@ public:
result.appendArray("oplog", arrBuilder.arr());
- // TODO: SERVER-40187 remove after v4.2. This is to indicate the caller that this server
- // waits for notification on new oplog entries to send over so the caller doesn't need
- // to throttle.
- result.append("waitsForNewOplog", true);
-
return true;
}
diff --git a/src/mongo/db/s/session_catalog_migration_destination.cpp b/src/mongo/db/s/session_catalog_migration_destination.cpp
index 2ae622b4e51..380c97cb1da 100644
--- a/src/mongo/db/s/session_catalog_migration_destination.cpp
+++ b/src/mongo/db/s/session_catalog_migration_destination.cpp
@@ -55,7 +55,6 @@ namespace mongo {
namespace {
const auto kOplogField = "oplog";
-const auto kWaitsForNewOplogField = "waitsForNewOplog";
const WriteConcernOptions kMajorityWC(WriteConcernOptions::kMajority,
WriteConcernOptions::SyncMode::UNSET,
Milliseconds(0));
@@ -389,7 +388,6 @@ void SessionCatalogMigrationDestination::_retrieveSessionStateFromSource(Service
nextBatch = getNextSessionOplogBatch(opCtx, _fromShard, _migrationSessionId);
oplogArray = BSONArray{nextBatch[kOplogField].Obj()};
- const auto donorWaitsForNewOplog = nextBatch[kWaitsForNewOplogField].trueValue();
if (oplogArray.isEmpty()) {
{
@@ -422,15 +420,6 @@ void SessionCatalogMigrationDestination::_retrieveSessionStateFromSource(Service
}
}
- // TODO: SERVER-40187 Completely remove after v4.2. donorWaitsForNewOplog is a
- // 'feature flag' indicating that the donor does block until there are new oplog
- // to return so we don't need to sleep here.
- if (!donorWaitsForNewOplog && lastOpTimeWaited == lastResult.oplogTime) {
- // We got an empty result at least twice in a row from the source shard so space
- // it out a little bit so we don't hammer the shard
- opCtx->sleepFor(Milliseconds(200));
- }
-
lastOpTimeWaited = lastResult.oplogTime;
}
}