diff options
author | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2019-07-10 18:37:46 +0200 |
---|---|---|
committer | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2019-07-14 08:14:07 -0400 |
commit | 903207938dc05f9e3f4ca546232d8a7ceda99e4c (patch) | |
tree | 1afc0550abe5a044e74e3fce1e4a48a4b98b286a /src/mongo/db/s/transaction_coordinator_structures.h | |
parent | e6644474d876eb99579101e81d38c363feef07cd (diff) | |
download | mongo-903207938dc05f9e3f4ca546232d8a7ceda99e4c.tar.gz |
SERVER-41204 Output the transaction abort reason in the slow log line
Diffstat (limited to 'src/mongo/db/s/transaction_coordinator_structures.h')
-rw-r--r-- | src/mongo/db/s/transaction_coordinator_structures.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/mongo/db/s/transaction_coordinator_structures.h b/src/mongo/db/s/transaction_coordinator_structures.h index 76f7890990d..13462d2a273 100644 --- a/src/mongo/db/s/transaction_coordinator_structures.h +++ b/src/mongo/db/s/transaction_coordinator_structures.h @@ -33,6 +33,7 @@ #include <vector> #include "mongo/bson/bsonobj.h" +#include "mongo/bson/bsonobjbuilder.h" #include "mongo/logger/logstream_builder.h" #include "mongo/s/shard_id.h" @@ -49,7 +50,7 @@ enum class PrepareVote { using CommitDecision = PrepareVote; /** - * String serializer/deserializer for the commit decision property values. + * String serializer/deserializer for the commit decision enum values. */ CommitDecision readCommitDecisionEnumProperty(StringData decision); StringData writeCommitDecisionEnumProperty(CommitDecision decision); @@ -57,5 +58,11 @@ StringData writeCommitDecisionEnumProperty(CommitDecision decision); logger::LogstreamBuilder& operator<<(logger::LogstreamBuilder& stream, const CommitDecision& decision); +/** + * Optional serializer/deserializer for the generic server 'Status' type. + */ +Status readStatusProperty(const BSONElement& statusBSON); +void writeStatusProperty(const Status& status, StringData fieldName, BSONObjBuilder* builder); + } // namespace txn } // namespace mongo |