diff options
author | Bernard Gorman <bernard.gorman@gmail.com> | 2020-02-08 02:27:50 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-02-16 03:04:02 +0000 |
commit | 1d21e89fa5c9d838b2f40045c26fe41f306a8873 (patch) | |
tree | 28c3c1475721462c23322f421bf1067daad7346d /src/mongo | |
parent | e3c004d38fe196da61ae9aea3ea0185a275ea4e6 (diff) | |
download | mongo-1d21e89fa5c9d838b2f40045c26fe41f306a8873.tar.gz |
SERVER-44356 Set config server periodicNoopIntervalSecs to 1
Diffstat (limited to 'src/mongo')
-rw-r--r-- | src/mongo/db/repl/replication_coordinator_impl.cpp | 8 | ||||
-rw-r--r-- | src/mongo/db/repl/replication_coordinator_impl.idl | 2 |
2 files changed, 8 insertions, 2 deletions
diff --git a/src/mongo/db/repl/replication_coordinator_impl.cpp b/src/mongo/db/repl/replication_coordinator_impl.cpp index e93a25bb29b..c3cfc7b646f 100644 --- a/src/mongo/db/repl/replication_coordinator_impl.cpp +++ b/src/mongo/db/repl/replication_coordinator_impl.cpp @@ -334,7 +334,13 @@ ReplicationCoordinatorImpl::ReplicationCoordinatorImpl( return; } - _externalState->setupNoopWriter(Seconds(periodicNoopIntervalSecs)); + // If this is a config server, then we set the periodic no-op interval to 1 second. This is to + // ensure that the config server will not unduly hold up change streams running on the cluster. + if (serverGlobalParams.clusterRole == ClusterRole::ConfigServer) { + periodicNoopIntervalSecs.store(1); + } + + _externalState->setupNoopWriter(Seconds(periodicNoopIntervalSecs.load())); } ReplicationCoordinatorImpl::~ReplicationCoordinatorImpl() = default; diff --git a/src/mongo/db/repl/replication_coordinator_impl.idl b/src/mongo/db/repl/replication_coordinator_impl.idl index 88b3428e666..3775a2afe80 100644 --- a/src/mongo/db/repl/replication_coordinator_impl.idl +++ b/src/mongo/db/repl/replication_coordinator_impl.idl @@ -60,7 +60,7 @@ server_parameters: description: <- Number of seconds between noop writer writes. set_at: [ startup ] - cpp_vartype: int + cpp_vartype: AtomicWord<int> cpp_varname: periodicNoopIntervalSecs default: 10 validator: |