summaryrefslogtreecommitdiffstats
path: root/wsrep-lib/include/wsrep
diff options
context:
space:
mode:
Diffstat (limited to 'wsrep-lib/include/wsrep')
-rw-r--r--wsrep-lib/include/wsrep/client_service.hpp10
-rw-r--r--wsrep-lib/include/wsrep/reporter.hpp16
2 files changed, 18 insertions, 8 deletions
diff --git a/wsrep-lib/include/wsrep/client_service.hpp b/wsrep-lib/include/wsrep/client_service.hpp
index d47396df..e5aa6499 100644
--- a/wsrep-lib/include/wsrep/client_service.hpp
+++ b/wsrep-lib/include/wsrep/client_service.hpp
@@ -195,6 +195,16 @@ namespace wsrep
virtual bool is_explicit_xa() = 0;
/**
+ * Returns true if the client has an ongoing XA transaction
+ * in prepared state.
+ * Notice: one could simply check if wsrep::transaction is
+ * in s_prepared state. However, wsrep::transaction does not
+ * transition to prepared state for read-only / empty
+ * transactions.
+ */
+ virtual bool is_prepared_xa() = 0;
+
+ /**
* Returns true if the currently executing command is
* a rollback for XA. This is used to avoid setting a
* a deadlock error rollback as it may be unexpected
diff --git a/wsrep-lib/include/wsrep/reporter.hpp b/wsrep-lib/include/wsrep/reporter.hpp
index 3e8c7000..05cc5230 100644
--- a/wsrep-lib/include/wsrep/reporter.hpp
+++ b/wsrep-lib/include/wsrep/reporter.hpp
@@ -105,21 +105,21 @@ namespace wsrep
typedef struct {
double tstamp;
std::string msg;
- } log_msg;
+ } log_msg_t ;
- std::deque<log_msg> err_msg_;
- std::deque<log_msg> warn_msg_;
- std::deque<log_msg> events_;
+ std::deque<log_msg_t> err_msg_;
+ std::deque<log_msg_t> warn_msg_;
+ std::deque<log_msg_t> events_;
size_t const max_msg_;
static void write_log_msg(std::ostream& os,
- const log_msg& msg);
+ const log_msg_t& msg);
static void write_event(std::ostream& os,
- const log_msg& msg);
+ const log_msg_t& msg);
static void write_array(std::ostream& os, const std::string& label,
- const std::deque<log_msg>& events,
+ const std::deque<log_msg_t>& events,
void (*element_writer)(std::ostream& os,
- const log_msg& msg));
+ const log_msg_t& msg));
substates substate_map(enum server_state::state state);
float progress_map(float progress) const;
void write_file(double timestamp);