diff options
author | Kevin Pulo <kevin.pulo@mongodb.com> | 2020-02-20 04:50:44 +0000 |
---|---|---|
committer | evergreen <evergreen@mongodb.com> | 2020-02-20 04:50:44 +0000 |
commit | 7eb6f03dd34615f2774a2cb70dadeffadce4512e (patch) | |
tree | a8986ee344e486c9937b85f5dd28d865b5e0e5c4 /src/mongo/db/write_concern.h | |
parent | 35667cfb9ef6c4400eea314ec15da36d1880ebca (diff) | |
download | mongo-7eb6f03dd34615f2774a2cb70dadeffadce4512e.tar.gz |
SERVER-45623 improve diagnosability of default writeConcern
- Include the writeConcern in writeConcernErrors
- Add serverStatus counters for default writeConcern timeouts and unsatisfiability
Diffstat (limited to 'src/mongo/db/write_concern.h')
-rw-r--r-- | src/mongo/db/write_concern.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mongo/db/write_concern.h b/src/mongo/db/write_concern.h index 5e2ab1af65f..97960f3bcf9 100644 --- a/src/mongo/db/write_concern.h +++ b/src/mongo/db/write_concern.h @@ -71,14 +71,17 @@ struct WriteConcernResult { wTimedOut = false; wTime = -1; err = ""; + wcUsed = WriteConcernOptions(); } - void appendTo(const WriteConcernOptions& writeConcern, BSONObjBuilder* result) const; + void appendTo(BSONObjBuilder* result) const; int syncMillis; bool wTimedOut; int wTime; std::vector<HostAndPort> writtenTo; + WriteConcernOptions wcUsed; + std::string err; // this is the old err field, should deprecate // This field has had a dummy value since MMAP went away. It is undocumented. |