diff options
author | Eric Milkie <milkie@10gen.com> | 2012-05-31 11:04:06 -0400 |
---|---|---|
committer | Eric Milkie <milkie@10gen.com> | 2012-06-01 15:12:28 -0400 |
commit | 77649a165ee800c7b519b91461084b7a619d279e (patch) | |
tree | 52702080633c89cce4d37212d4898f4dd140457c /src/mongo/db/prefetch.h | |
parent | 25ee6dfdc9e52ab93e664d166352d6787af6a4e3 (diff) | |
download | mongo-77649a165ee800c7b519b91461084b7a619d279e.tar.gz |
prefetch code for support of SERVER-5685
Diffstat (limited to 'src/mongo/db/prefetch.h')
-rw-r--r-- | src/mongo/db/prefetch.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/mongo/db/prefetch.h b/src/mongo/db/prefetch.h new file mode 100644 index 00000000000..29e5f3871d0 --- /dev/null +++ b/src/mongo/db/prefetch.h @@ -0,0 +1,31 @@ +/** +* Copyright (C) 2008 10gen Inc. +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU Affero General Public License, version 3, +* as published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Affero General Public License for more details. +* +* You should have received a copy of the GNU Affero General Public License +* along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ +#pragma once + +#include "mongo/db/jsobj.h" +#include "mongo/db/diskloc.h" + +namespace mongo { + class NamespaceDetails; + // page in pages needed for all index lookups on a given object + void prefetchIndexPages(const char *ns, const BSONObj& obj); + + // page in the data pages for a record associated with an object + void prefetchRecordPages(const char *ns, const BSONObj& obj); + + // page in both index and data pages for an op from the oplog + void prefetchPagesForReplicatedOp(const BSONObj& op); +} |