summaryrefslogtreecommitdiff
path: root/src/mongo/db/vector_clock.cpp
diff options
context:
space:
mode:
authorTommaso Tocci <tommaso.tocci@mongodb.com>2021-08-05 13:38:59 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-08-05 14:27:12 +0000
commit3fba330aef29a34bbf93a191e0b50e39c5e70b16 (patch)
treea4247a1bd5fac5e4a7157f09029ff4001e21d809 /src/mongo/db/vector_clock.cpp
parent1f4dbf3dde9d6b3da361a4ec3a27647920d75a64 (diff)
downloadmongo-3fba330aef29a34bbf93a191e0b50e39c5e70b16.tar.gz
SERVER-54252 Cleanup legacy configOpTime gossiping
Diffstat (limited to 'src/mongo/db/vector_clock.cpp')
-rw-r--r--src/mongo/db/vector_clock.cpp44
1 files changed, 2 insertions, 42 deletions
diff --git a/src/mongo/db/vector_clock.cpp b/src/mongo/db/vector_clock.cpp
index 2159fd2a012..61b3114b3e6 100644
--- a/src/mongo/db/vector_clock.cpp
+++ b/src/mongo/db/vector_clock.cpp
@@ -154,35 +154,6 @@ public:
}
};
-template <class ActualFormat>
-class VectorClock::OnlyOutOnNewFCVComponentFormat : public ActualFormat {
-public:
- using ActualFormat::ActualFormat;
- virtual ~OnlyOutOnNewFCVComponentFormat() = default;
-
- bool out(ServiceContext* service,
- OperationContext* opCtx,
- bool permitRefresh,
- BSONObjBuilder* out,
- LogicalTime time,
- Component component) const override {
- if (serverGlobalParams.featureCompatibility.isVersionInitialized() &&
- serverGlobalParams.featureCompatibility.isGreaterThanOrEqualTo(
- ServerGlobalParams::FeatureCompatibility::Version::kUpgradingFrom44To47)) {
- return ActualFormat::out(service, opCtx, permitRefresh, out, time, component);
- }
- return false;
- }
-
- LogicalTime in(ServiceContext* service,
- OperationContext* opCtx,
- const BSONObj& in,
- bool couldBeUnauthenticated,
- Component component) const override {
- return ActualFormat::in(service, opCtx, in, couldBeUnauthenticated, component);
- }
-};
-
class VectorClock::SignedComponentFormat : public VectorClock::ComponentFormat {
public:
using ComponentFormat::ComponentFormat;
@@ -318,12 +289,8 @@ private:
const VectorClock::ComponentArray<std::unique_ptr<VectorClock::ComponentFormat>>
VectorClock::_gossipFormatters{
std::make_unique<VectorClock::SignedComponentFormat>(VectorClock::kClusterTimeFieldName),
- std::make_unique<
- VectorClock::OnlyOutOnNewFCVComponentFormat<VectorClock::PlainComponentFormat>>(
- VectorClock::kConfigTimeFieldName),
- std::make_unique<
- VectorClock::OnlyOutOnNewFCVComponentFormat<VectorClock::PlainComponentFormat>>(
- VectorClock::kTopologyTimeFieldName)};
+ std::make_unique<VectorClock::PlainComponentFormat>(VectorClock::kConfigTimeFieldName),
+ std::make_unique<VectorClock::PlainComponentFormat>(VectorClock::kTopologyTimeFieldName)};
bool VectorClock::gossipOut(OperationContext* opCtx,
BSONObjBuilder* outMessage,
@@ -413,13 +380,6 @@ void VectorClock::_disable() {
_isEnabled = false;
}
-void VectorClock::gossipInConfigOpTime(const repl::OpTime& configOpTime) {
- LogicalTimeArray newTimeArray;
- newTimeArray[Component::ClusterTime] = LogicalTime(configOpTime.getTimestamp());
- newTimeArray[Component::ConfigTime] = LogicalTime(configOpTime.getTimestamp());
- _advanceTime(std::move(newTimeArray));
-}
-
void VectorClock::resetVectorClock_forTest() {
stdx::lock_guard<Latch> lock(_mutex);
auto it = _vectorTime.begin();