diff options
author | Dwight <dwight@10gen.com> | 2011-01-03 12:08:17 -0500 |
---|---|---|
committer | Dwight <dwight@10gen.com> | 2011-01-03 12:08:17 -0500 |
commit | 411389f0805b8906a5a7d662ac3e7a53b68ec592 (patch) | |
tree | 691169741bc31b2478ee928a46bf4d44b2e68521 /db/dur.h | |
parent | 57c509a1c007e108610ed32113c091f8548e8b46 (diff) | |
download | mongo-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.h | 17 |
1 files changed, 7 insertions, 10 deletions
@@ -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 |