diff options
Diffstat (limited to 'src/mongo/db/repl')
6 files changed, 0 insertions, 59 deletions
diff --git a/src/mongo/db/repl/replication_consistency_markers.h b/src/mongo/db/repl/replication_consistency_markers.h index c5dac58222f..5ed49370c64 100644 --- a/src/mongo/db/repl/replication_consistency_markers.h +++ b/src/mongo/db/repl/replication_consistency_markers.h @@ -59,8 +59,6 @@ class StorageInterface; * ts: <Timestamp>, * t: <long long> * }, // field for 'appliedThrough' - * oplogDeleteFromPoint: <Timestamp>, // only exists on unclean upgrade - * // TODO (SERVER-30556): Remove after 3.6 * } * * The oplogTruncateAfterPoint document, in 'local.replset.oplogTruncateAfterPoint', is used to @@ -161,15 +159,6 @@ public: const Timestamp& timestamp) = 0; virtual Timestamp getOplogTruncateAfterPoint(OperationContext* opCtx) const = 0; - /** - * The oplog delete from point may still exist on upgrade from an unclean shutdown. This - * function removes the field so it's gone after 3.6. - * - * TODO (SERVER-30556): Delete this function in 3.8 because the old oplog delete from point - * cannot exist. - */ - virtual void removeOldOplogDeleteFromPointField(OperationContext* opCtx) = 0; - // -------- Applied Through ---------- /** diff --git a/src/mongo/db/repl/replication_consistency_markers.idl b/src/mongo/db/repl/replication_consistency_markers.idl index e78ff35628c..d9de74d55c2 100644 --- a/src/mongo/db/repl/replication_consistency_markers.idl +++ b/src/mongo/db/repl/replication_consistency_markers.idl @@ -50,14 +50,6 @@ structs: type: optime optional: true # This field is unset when we want to mark that we are consistent at the top of the oplog description: "The OpTime of the last oplog entry we applied" - # TODO (SERVER-30556): Delete this field since it cannot exist after 3.6. - oplogDeleteFromPoint: - cpp_name: oldOplogDeleteFromPoint - type: timestamp - optional: true # This field only exists on 3.4 upgrade - description: "The timestamp of the first oplog entry in a batch when we are writing - oplog entries to the oplog after which the oplog may be inconsistent. - This field only exists on 3.4 upgrade." doingInitialSync: cpp_name: initialSyncFlag type: bool diff --git a/src/mongo/db/repl/replication_consistency_markers_impl.cpp b/src/mongo/db/repl/replication_consistency_markers_impl.cpp index 1486d1ab397..6f68c22c733 100644 --- a/src/mongo/db/repl/replication_consistency_markers_impl.cpp +++ b/src/mongo/db/repl/replication_consistency_markers_impl.cpp @@ -241,17 +241,6 @@ void ReplicationConsistencyMarkersImpl::setMinValidToAtLeast(OperationContext* o invariant(status); } -void ReplicationConsistencyMarkersImpl::removeOldOplogDeleteFromPointField( - OperationContext* opCtx) { - TimestampedBSONObj update; - update.obj = BSON("$unset" << BSON(MinValidDocument::kOldOplogDeleteFromPointFieldName << 1)); - - // This is getting removed in SERVER-30556 before 3.8 is released, so the timestamp does not - // matter. - update.timestamp = Timestamp(); - _updateMinValidDocument(opCtx, update); -} - void ReplicationConsistencyMarkersImpl::setAppliedThrough(OperationContext* opCtx, const OpTime& optime) { invariant(!optime.isNull()); @@ -344,21 +333,6 @@ Timestamp ReplicationConsistencyMarkersImpl::getOplogTruncateAfterPoint( return out; } -Timestamp ReplicationConsistencyMarkersImpl::_getOldOplogDeleteFromPoint( - OperationContext* opCtx) const { - auto doc = _getMinValidDocument(opCtx); - invariant(doc); // Initialized at startup so it should never be missing. - - auto oplogDeleteFromPoint = doc->getOldOplogDeleteFromPoint(); - if (!oplogDeleteFromPoint) { - LOG(3) << "No oplogDeleteFromPoint timestamp set, returning empty timestamp."; - return {}; - } - - LOG(3) << "returning oplog delete from point: " << oplogDeleteFromPoint.get(); - return oplogDeleteFromPoint.get(); -} - Status ReplicationConsistencyMarkersImpl::createInternalCollections(OperationContext* opCtx) { for (auto nss : std::vector<NamespaceString>({_oplogTruncateAfterPointNss, _minValidNss})) { auto status = _storageInterface->createCollection(opCtx, nss, CollectionOptions()); diff --git a/src/mongo/db/repl/replication_consistency_markers_impl.h b/src/mongo/db/repl/replication_consistency_markers_impl.h index b26dc11b943..4c88556ccf5 100644 --- a/src/mongo/db/repl/replication_consistency_markers_impl.h +++ b/src/mongo/db/repl/replication_consistency_markers_impl.h @@ -71,8 +71,6 @@ public: void setOplogTruncateAfterPoint(OperationContext* opCtx, const Timestamp& timestamp) override; Timestamp getOplogTruncateAfterPoint(OperationContext* opCtx) const override; - void removeOldOplogDeleteFromPointField(OperationContext* opCtx) override; - void setAppliedThrough(OperationContext* opCtx, const OpTime& optime) override; void clearAppliedThrough(OperationContext* opCtx, const Timestamp& writeTimestamp) override; OpTime getAppliedThrough(OperationContext* opCtx) const override; @@ -102,13 +100,6 @@ private: OperationContext* opCtx) const; /** - * Returns the old oplog delete from point from the minValid document. Returns an empty - * timestamp if the field does not exist. This is used to fallback in FCV 3.4 if the oplog - * truncate after point document does not exist. - */ - Timestamp _getOldOplogDeleteFromPoint(OperationContext* opCtx) const; - - /** * Upserts the OplogTruncateAfterPoint document according to the provided update spec. The * collection must already exist. See `createInternalCollections`. * diff --git a/src/mongo/db/repl/replication_consistency_markers_mock.cpp b/src/mongo/db/repl/replication_consistency_markers_mock.cpp index 5eec1a793b6..cc41ce047cd 100644 --- a/src/mongo/db/repl/replication_consistency_markers_mock.cpp +++ b/src/mongo/db/repl/replication_consistency_markers_mock.cpp @@ -91,9 +91,6 @@ Timestamp ReplicationConsistencyMarkersMock::getOplogTruncateAfterPoint( return _oplogTruncateAfterPoint; } -void ReplicationConsistencyMarkersMock::removeOldOplogDeleteFromPointField( - OperationContext* opCtx) {} - void ReplicationConsistencyMarkersMock::setAppliedThrough(OperationContext* opCtx, const OpTime& optime) { stdx::lock_guard<stdx::mutex> lock(_minValidBoundariesMutex); diff --git a/src/mongo/db/repl/replication_consistency_markers_mock.h b/src/mongo/db/repl/replication_consistency_markers_mock.h index 42a86bc5c71..15b41acb701 100644 --- a/src/mongo/db/repl/replication_consistency_markers_mock.h +++ b/src/mongo/db/repl/replication_consistency_markers_mock.h @@ -63,8 +63,6 @@ public: void setOplogTruncateAfterPoint(OperationContext* opCtx, const Timestamp& timestamp) override; Timestamp getOplogTruncateAfterPoint(OperationContext* opCtx) const override; - void removeOldOplogDeleteFromPointField(OperationContext* opCtx) override; - void setAppliedThrough(OperationContext* opCtx, const OpTime& optime) override; void clearAppliedThrough(OperationContext* opCtx, const Timestamp& writeTimestamp) override; OpTime getAppliedThrough(OperationContext* opCtx) const override; |