diff options
author | Eric Milkie <milkie@10gen.com> | 2012-09-28 16:20:59 -0400 |
---|---|---|
committer | Eric Milkie <milkie@10gen.com> | 2012-10-02 17:45:59 -0400 |
commit | 275f68924ab8cec65fafe35193be5cbd722b3bef (patch) | |
tree | 20fd76a580e5518e7f49f5c4679b62c0c8f2a59d | |
parent | 1e852c70e5ad7907ec97142d27278a21324ae544 (diff) | |
download | mongo-275f68924ab8cec65fafe35193be5cbd722b3bef.tar.gz |
SERVER-6671 add ROLLBACK to the list of states where we suppress duplicate 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.
-rw-r--r-- | src/mongo/db/repl/rs.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mongo/db/repl/rs.h b/src/mongo/db/repl/rs.h index 6e45726ce88..6b6879e0fc1 100644 --- a/src/mongo/db/repl/rs.h +++ b/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; } } |