diff options
author | Mathias Stearn <mathias@10gen.com> | 2016-11-14 18:33:31 -0500 |
---|---|---|
committer | Mathias Stearn <redbeard0531@gmail.com> | 2016-11-15 14:07:54 -0500 |
commit | 491879a73d9a6304c9b3824193a3a29d09039b15 (patch) | |
tree | 82c42776aac5a711fba6551803b36cbe57d81125 | |
parent | b34b61e725ca439f6ac1878008a369be20fc3972 (diff) | |
download | mongo-491879a73d9a6304c9b3824193a3a29d09039b15.tar.gz |
SERVER-26716 Fix crash after 3.2.old->3.2.new->3.2.old up/downgrader3.2.11-rc1
This was only an issue for nodes that had never done writes as a secondary
and therefore hadn't written a minValid point.
(cherry picked from commit 39d650faa5436a37359ca45717d5e988fb4461cb)
-rw-r--r-- | src/mongo/db/repl/replication_coordinator_external_state_impl.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mongo/db/repl/replication_coordinator_external_state_impl.cpp b/src/mongo/db/repl/replication_coordinator_external_state_impl.cpp index 67abc29502e..128e18b9f53 100644 --- a/src/mongo/db/repl/replication_coordinator_external_state_impl.cpp +++ b/src/mongo/db/repl/replication_coordinator_external_state_impl.cpp @@ -335,6 +335,10 @@ void ReplicationCoordinatorExternalStateImpl::cleanUpLastApplyBatch(OperationCon return; // Initial Sync will take over so no cleanup is needed. } + // This initializes the minvalid document with a null "ts" because older versions (<3.2.10) + // get angry if the minValid document is present but doesn't have a "ts" field. + setMinValidToAtLeast(txn, {}); + const auto deleteFromPoint = getOplogDeleteFromPoint(txn); const auto appliedThrough = getAppliedThrough(txn); |