summaryrefslogtreecommitdiff
path: root/db/dur.h
diff options
context:
space:
mode:
authordwight <dwight@10gen.com>2010-11-13 13:04:48 -0500
committerdwight <dwight@10gen.com>2010-11-13 13:04:48 -0500
commit62d48d63dd1381d10b0d8601152e2e6c94c14f85 (patch)
tree646635024760915ad99a6ce609a8f81f0d5cc181 /db/dur.h
parentdad0b0bb254e03dad46e72e331fd0f6a4eaab9c3 (diff)
downloadmongo-62d48d63dd1381d10b0d8601152e2e6c94c14f85.tar.gz
dur
Diffstat (limited to 'db/dur.h')
-rw-r--r--db/dur.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/db/dur.h b/db/dur.h
index 5a2e5a2b8bf..d8b3b68dd0a 100644
--- a/db/dur.h
+++ b/db/dur.h
@@ -10,6 +10,7 @@ namespace mongo {
namespace dur {
#if !defined(_DURABLE)
+ inline void startup() { }
inline void* writingPtr(void *x, size_t len) { return x; }
inline DiskLoc& writingDiskLoc(DiskLoc& d) { return d; }
inline int& writingInt(int& d) { return d; }
@@ -18,6 +19,9 @@ namespace mongo {
template <typename T> inline T* writingNoLog(T *x) { return x; }
#else
+ /** call during startup so durability module can initialize */
+ void startup();
+
/** Declarations of write intent.
Use these methods to declare "i'm about to write to x and it should be logged for redo."
@@ -44,12 +48,13 @@ namespace mongo {
}
/** declare our intent to write, but it doesn't have to be journaled, as this write is
- something 'unimportant'.
+ something 'unimportant'. depending on our implementation, we may or may not be able
+ to take advantage of this versus doing the normal work we do.
*/
template <typename T>
inline
T* writingNoLog(T *x) {
- log() << "todo dur nolog not yet optimized" << endl;
+ DEV RARELY log() << "todo dur nolog not yet optimized" << endl;
return (T*) writingPtr(x, sizeof(T));
}