summaryrefslogtreecommitdiff
path: root/src/mongo/db/s/transaction_coordinator_structures.h
diff options
context:
space:
mode:
authorKaloian Manassiev <kaloian.manassiev@mongodb.com>2019-07-10 18:37:46 +0200
committerKaloian Manassiev <kaloian.manassiev@mongodb.com>2019-07-14 08:14:07 -0400
commit903207938dc05f9e3f4ca546232d8a7ceda99e4c (patch)
tree1afc0550abe5a044e74e3fce1e4a48a4b98b286a /src/mongo/db/s/transaction_coordinator_structures.h
parente6644474d876eb99579101e81d38c363feef07cd (diff)
downloadmongo-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.h9
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