diff options
author | Eliot Horowitz <eliot@10gen.com> | 2011-03-07 12:09:23 -0500 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2011-03-07 12:18:43 -0500 |
commit | a14508a41e4294931b0fde802973b94f2b13bf56 (patch) | |
tree | a9b521458697b500d9624548db594e302131068a /db/dur.h | |
parent | 3754755c30ad83c679e7a82bd2afbd3299c4ca26 (diff) | |
download | mongo-a14508a41e4294931b0fde802973b94f2b13bf56.tar.gz |
dur commitIfNeeded returns if it commited
Diffstat (limited to 'db/dur.h')
-rw-r--r-- | db/dur.h | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -96,8 +96,9 @@ namespace mongo { (like creating an index or update with $atomic) can call this whenever the db is in a sane state and it will prevent commits from growing too large. + @return true if commited */ - virtual void commitIfNeeded() = 0; + virtual bool commitIfNeeded() = 0; /** Declare write intent for a DiskLoc. @see DiskLoc::writing() */ inline DiskLoc& writingDiskLoc(DiskLoc& d) { return *((DiskLoc*) writingPtr(&d, sizeof(d))); } @@ -172,7 +173,7 @@ namespace mongo { void createdFile(string filename, unsigned long long len) { } bool awaitCommit() { return false; } bool commitNow() { return false; } - void commitIfNeeded() { } + bool commitIfNeeded() { return false; } void setNoJournal(void *dst, void *src, unsigned len); void syncDataAndTruncateJournal() {} }; @@ -185,7 +186,7 @@ namespace mongo { void createdFile(string filename, unsigned long long len); bool awaitCommit(); bool commitNow(); - void commitIfNeeded(); + bool commitIfNeeded(); void setNoJournal(void *dst, void *src, unsigned len); void syncDataAndTruncateJournal(); }; |