summaryrefslogtreecommitdiff
path: root/db/dur.h
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2011-03-07 12:09:23 -0500
committerEliot Horowitz <eliot@10gen.com>2011-03-07 12:18:43 -0500
commita14508a41e4294931b0fde802973b94f2b13bf56 (patch)
treea9b521458697b500d9624548db594e302131068a /db/dur.h
parent3754755c30ad83c679e7a82bd2afbd3299c4ca26 (diff)
downloadmongo-a14508a41e4294931b0fde802973b94f2b13bf56.tar.gz
dur commitIfNeeded returns if it commited
Diffstat (limited to 'db/dur.h')
-rw-r--r--db/dur.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/db/dur.h b/db/dur.h
index ea8bf342b3f..a8035e4e7bc 100644
--- a/db/dur.h
+++ b/db/dur.h
@@ -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();
};