diff options
author | Greg Studer <greg@10gen.com> | 2013-12-05 16:53:18 -0500 |
---|---|---|
committer | Greg Studer <greg@10gen.com> | 2013-12-09 12:05:40 -0500 |
commit | 86848b30c3014247ab27fdff38ffaa36c1baa2fa (patch) | |
tree | 27b5bdc819d6c97ed9daa928579c947684c43b27 /src/mongo/db/write_concern.h | |
parent | 6ea28a261ff80e27cf0accaca421df3b13e3b20b (diff) | |
download | mongo-86848b30c3014247ab27fdff38ffaa36c1baa2fa.tar.gz |
SERVER-11977 support for non-client opTime in mongod GLE
Also removes client dependency from waitForWriteConcern.
Diffstat (limited to 'src/mongo/db/write_concern.h')
-rw-r--r-- | src/mongo/db/write_concern.h | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/src/mongo/db/write_concern.h b/src/mongo/db/write_concern.h index 865507acd91..ca26cd99b82 100644 --- a/src/mongo/db/write_concern.h +++ b/src/mongo/db/write_concern.h @@ -49,7 +49,6 @@ namespace mongo { string wMode; int wTimeout; - }; struct WriteConcernResult { @@ -77,9 +76,21 @@ namespace mongo { string err; // this is the old err field, should deprecate }; - Status waitForWriteConcern(Client& client, - const WriteConcernOptions& writeConcern, - WriteConcernResult* result ); + /** + * Blocks until the database is sure the specified user write concern has been fulfilled, or + * returns an error status if the write concern fails. + * + * Takes a user write concern as well as the replication opTime the write concern applies to - + * if this opTime.isNull() no replication-related write concern options will be enforced. + * + * Returns result of the write concern if successful. + * Returns !OK if anything goes wrong. + * Returns WriteConcernLegacyOK if the write concern could not be applied but legacy GLE should + * not report an error. + */ + Status waitForWriteConcern( const WriteConcernOptions& writeConcern, + const OpTime& replOpTime, + WriteConcernResult* result ); } // namespace mongo |