diff options
author | Eric Milkie <milkie@10gen.com> | 2015-01-21 11:30:57 -0500 |
---|---|---|
committer | Eric Milkie <milkie@10gen.com> | 2015-01-22 11:59:22 -0500 |
commit | 44fd8e4e903d65dceb583c84cc5ec430c9350ad8 (patch) | |
tree | 333f4e74524d2be72779fe19bef548a18b0d2365 /src/mongo/db/index | |
parent | 612f66c61c12b705fe3c5ed251d63525f1bf650a (diff) | |
download | mongo-44fd8e4e903d65dceb583c84cc5ec430c9350ad8.tar.gz |
SERVER-16908 disable MMAPv1 rollback during fg index build, for perf
Diffstat (limited to 'src/mongo/db/index')
-rw-r--r-- | src/mongo/db/index/btree_based_bulk_access_method.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mongo/db/index/btree_based_bulk_access_method.cpp b/src/mongo/db/index/btree_based_bulk_access_method.cpp index 12fcd1bfbd2..fa1121ac5e9 100644 --- a/src/mongo/db/index/btree_based_bulk_access_method.cpp +++ b/src/mongo/db/index/btree_based_bulk_access_method.cpp @@ -150,6 +150,11 @@ namespace mongo { } WriteUnitOfWork wunit(_txn); + // Improve performance in the btree-building phase by disabling rollback tracking. + // This avoids copying all the written bytes to a buffer that is only used to roll back. + // Note that this is safe to do, as this entire index-build-in-progress will be cleaned + // up by the index system. + _txn->recoveryUnit()->setRollbackWritesDisabled(); // Get the next datum and add it to the builder. BSONObjExternalSorter::Data d = i->next(); |