summaryrefslogtreecommitdiff
path: root/db/dur.h
diff options
context:
space:
mode:
authorDwight <dwight@10gen.com>2011-01-03 12:08:17 -0500
committerDwight <dwight@10gen.com>2011-01-03 12:08:17 -0500
commit411389f0805b8906a5a7d662ac3e7a53b68ec592 (patch)
tree691169741bc31b2478ee928a46bf4d44b2e68521 /db/dur.h
parent57c509a1c007e108610ed32113c091f8548e8b46 (diff)
downloadmongo-411389f0805b8906a5a7d662ac3e7a53b68ec592.tar.gz
dur cleanup of nolog method. no change in actual behavior yet.
Diffstat (limited to 'db/dur.h')
-rw-r--r--db/dur.h17
1 files changed, 7 insertions, 10 deletions
diff --git a/db/dur.h b/db/dur.h
index 4f38c72b4f7..8bec4b803c8 100644
--- a/db/dur.h
+++ b/db/dur.h
@@ -143,17 +143,12 @@ namespace mongo {
BtreeBucket* writing( BtreeBucket* );
/** Unimplemented: NamespaceDetails may be based on references to 'Extra' objects. */
NamespaceDetails* writing( NamespaceDetails* );
-
- /** declare our intent to write, but it doesn't have to be journaled, as this write is
- 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.
+
+ /** write something that doesn't have to be journaled, as this write is "unimportant".
+ a good example is paddingFactor.
+ can be thought of as memcpy(dst,src,len)
*/
- template <typename T>
- inline
- T* writingNoLog(T *x) {
- DEV RARELY log() << "todo dur nolog not yet optimized" << endl;
- return (T*) writingPtr(x, sizeof(T));
- }
+ virtual void setNoJournal(void *dst, void *src, unsigned len) = 0;
/* assert that we have not (at least so far) declared write intent for p */
inline void assertReading(void *p) {
@@ -182,6 +177,7 @@ namespace mongo {
bool awaitCommit() { return false; }
bool commitNow() { return false; }
void commitIfNeeded() { }
+ void setNoJournal(void *dst, void *src, unsigned len);
#if defined(_DEBUG)
void debugCheckLastDeclaredWrite() {}
#endif
@@ -197,6 +193,7 @@ namespace mongo {
bool awaitCommit();
bool commitNow();
void commitIfNeeded();
+ void setNoJournal(void *dst, void *src, unsigned len);
#if defined(_DEBUG)
void debugCheckLastDeclaredWrite();
#endif