Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

SERVER-6671 add ROLLBACK to the list of states where we suppress dupl…

…icate key enforcement

During rollback, there is a stage where we apply all the docs we fetched to undo all the
rolled-back operations.  This stage may encounter duplicate key errors, since we are
fetching the docs from the future and not from the time when they were recorded in the oplog.
  • Loading branch information...
commit 275f68924ab8cec65fafe35193be5cbd722b3bef 1 parent 1e852c7
Eric Milkie milkie authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  src/mongo/db/repl/rs.h
3  src/mongo/db/repl/rs.h
@@ -675,7 +675,8 @@ namespace mongo {
// see SERVER-6671
MemberState ms = theReplSet->state();
if ((ms == MemberState::RS_STARTUP2) ||
- (ms == MemberState::RS_RECOVERING)) {
+ (ms == MemberState::RS_RECOVERING) ||
+ (ms == MemberState::RS_ROLLBACK)) {
return true;
Please sign in to comment.
Something went wrong with that request. Please try again.