diff options
Diffstat (limited to 'src/mongo/db/write_concern.h')
-rw-r--r-- | src/mongo/db/write_concern.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/mongo/db/write_concern.h b/src/mongo/db/write_concern.h index 98d7893a2e1..19513e4f969 100644 --- a/src/mongo/db/write_concern.h +++ b/src/mongo/db/write_concern.h @@ -34,6 +34,23 @@ namespace mongo { class OperationContext; + template <typename T> class StatusWith; + + /** + * If "writeConcern" indicates a durable commit level, + * marks the RecoveryUnit associated with "txn" appropriately. + * Provides a hint to the storage engine that + * particular operations will be waiting for their changes to become durable. + */ + void setupSynchronousCommit(const WriteConcernOptions& writeConcern, + OperationContext* txn); + + /** + * Attempts to extract a writeConcern from cmdObj. + * Verifies that the writeConcern is of type Object (BSON type) and + * that the resulting writeConcern is valid for this particular host. + */ + StatusWith<WriteConcernOptions> extractWriteConcern(const BSONObj& cmdObj); /** * Verifies that a WriteConcern is valid for this particular host. |