summaryrefslogtreecommitdiff
path: root/src/mongo/client/streamable_replica_set_monitor.cpp
diff options
context:
space:
mode:
authorPierlauro Sciarelli <pierlauro.sciarelli@mongodb.com>2020-09-01 15:52:52 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-09-01 19:20:50 +0000
commit2013590813196d5cc63dcb7e9f3299b4db4a28c4 (patch)
tree974aae664fc44617d93ac2cb2167af70baa35a1c /src/mongo/client/streamable_replica_set_monitor.cpp
parentc92b00753dd0d4db9839fb682affd9b01a88c45e (diff)
downloadmongo-2013590813196d5cc63dcb7e9f3299b4db4a28c4.tar.gz
SERVER-49970 Prefer the VectorClock's ConfigTime to configOpTime when querying config servers \
Co-authored-by: Pierlauro Sciarelli <pierlauro.sciarelli@mongodb.com> Co-authored-by: Kevin Pulo <kevin.pulo@mongodb.com>
Diffstat (limited to 'src/mongo/client/streamable_replica_set_monitor.cpp')
-rw-r--r--src/mongo/client/streamable_replica_set_monitor.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mongo/client/streamable_replica_set_monitor.cpp b/src/mongo/client/streamable_replica_set_monitor.cpp
index 28c87809feb..03c127ca38c 100644
--- a/src/mongo/client/streamable_replica_set_monitor.cpp
+++ b/src/mongo/client/streamable_replica_set_monitor.cpp
@@ -91,11 +91,11 @@ bool primaryOrSecondaryPredicate(const ServerDescriptionPtr& server) {
return serverType == ServerType::kRSPrimary || serverType == ServerType::kRSSecondary;
}
-std::string readPrefToStringWithMinOpTime(const ReadPreferenceSetting& readPref) {
+std::string readPrefToStringFull(const ReadPreferenceSetting& readPref) {
BSONObjBuilder builder;
readPref.toInnerBSON(&builder);
- if (!readPref.minOpTime.isNull()) {
- builder.append("minOpTime", readPref.minOpTime.toBSON());
+ if (!readPref.minClusterTime.isNull()) {
+ builder.append("minClusterTime", readPref.minClusterTime.toBSON());
}
return builder.obj().toString();
}
@@ -275,7 +275,7 @@ SemiFuture<std::vector<HostAndPort>> StreamableReplicaSetMonitor::getHostsOrRefr
"RSM {replicaSet} start async getHosts with {readPref}",
"RSM start async getHosts",
"replicaSet"_attr = getName(),
- "readPref"_attr = readPrefToStringWithMinOpTime(criteria));
+ "readPref"_attr = readPrefToStringFull(criteria));
// fail fast on timeout
const Date_t& now = _executor->now();
@@ -748,7 +748,7 @@ void StreamableReplicaSetMonitor::_processOutstanding(
"RSM {replicaSet} finished async getHosts: {readPref} ({duration})",
"RSM finished async getHosts",
"replicaSet"_attr = getName(),
- "readPref"_attr = readPrefToStringWithMinOpTime(query->criteria),
+ "readPref"_attr = readPrefToStringFull(query->criteria),
"duration"_attr = Milliseconds(latency));
shouldRemove = true;
}