summaryrefslogtreecommitdiff
path: root/src/mongo/db/index_rebuilder.cpp
diff options
context:
space:
mode:
authorKristina <kristina@10gen.com>2013-01-02 10:41:44 -0500
committerKristina <kristina@10gen.com>2013-01-02 10:44:58 -0500
commite04a7396ea753ea6dbff89028c11ed689868d707 (patch)
tree042038ef3865de5de48df3afd18740f1d1b2c37a /src/mongo/db/index_rebuilder.cpp
parent43cc1547aaf72146f937d3ae72325807539a4199 (diff)
downloadmongo-e04a7396ea753ea6dbff89028c11ed689868d707.tar.gz
SERVER-2771 Revert command handling
This reverts commit e733331c7edb8871ba2dc58f20fbd2f40bf3adda. This reverts commit ccf86a0fdbe7f9c9a45e8fad0410a7eef777fea2. This reverts commit 7962e49b40c2bf344187df4c6fdd857c2255d759. This reverts commit c5e5e6b9c0d9609234afd1390984d08f6055801b. This reverts commit 325ec6e4d66dfdc075b47a804314eec8f7ea3eb2. This reverts commit 283fc0d291c196232cebc8b964178037aa71f943. This reverts commit 2f21426abe2d75487c91fb361154261969d303cd.
Diffstat (limited to 'src/mongo/db/index_rebuilder.cpp')
-rw-r--r--src/mongo/db/index_rebuilder.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mongo/db/index_rebuilder.cpp b/src/mongo/db/index_rebuilder.cpp
index 72e79ebc8df..716c582f0d5 100644
--- a/src/mongo/db/index_rebuilder.cpp
+++ b/src/mongo/db/index_rebuilder.cpp
@@ -107,6 +107,11 @@ namespace mongo {
// forever. Thus, we're assuming no journaling will happen between now and the entry being
// re-written.
+ // We need to force a foreground index build to prevent replication from replaying an
+ // incompatible op (like a drop) during a yield.
+ // TODO: once commands can interrupt/wait for index builds, this can be removed.
+ indexObj = indexObj.removeField("background");
+
try {
const std::string ns = dbName + ".system.indexes";
theDataFileMgr.insert(ns.c_str(), indexObj.objdata(), indexObj.objsize(), false, true);