1
0
mirror of https://github.com/codership/wsrep-lib.git synced 2025-07-28 20:02:00 +03:00

Some methods in wsrep-lib still hide/ignore return codes from provider

which complicates diagnostics and debugging.

Don't ignore provider return codes and more verbose error logging for
sst_sent(), sst_received(), set_encryption_key() methods

Refs codership/wsrep-lib#127
This commit is contained in:
Alexey Yurchenko
2020-03-27 15:31:23 +02:00
parent 593f737605
commit daae4a9c35
6 changed files with 107 additions and 49 deletions

View File

@ -186,16 +186,7 @@ namespace wsrep
std::string flags_to_string(int flags);
static inline
std::ostream& operator<<(std::ostream& os, const wsrep::ws_meta& ws_meta)
{
os << "gtid: " << ws_meta.gtid()
<< " server_id: " << ws_meta.server_id()
<< " client_id: " << ws_meta.client_id()
<< " trx_id: " << ws_meta.transaction_id()
<< " flags: " << ws_meta.flags() << " (" << wsrep::flags_to_string(ws_meta.flags()) << ")";
return os;
}
std::ostream& operator<<(std::ostream& os, const wsrep::ws_meta& ws_meta);
// Abstract interface for provider implementations
class provider
@ -250,6 +241,8 @@ namespace wsrep
error_unknown
};
static std::string to_string(enum status);
struct flag
{
static const int start_transaction = (1 << 0);
@ -385,9 +378,9 @@ namespace wsrep
* Return last committed GTID.
*/
virtual wsrep::gtid last_committed_gtid() const = 0;
virtual int sst_sent(const wsrep::gtid&, int) = 0;
virtual int sst_received(const wsrep::gtid&, int) = 0;
virtual int enc_set_key(const wsrep::const_buffer& key) = 0;
virtual enum status sst_sent(const wsrep::gtid&, int) = 0;
virtual enum status sst_received(const wsrep::gtid&, int) = 0;
virtual enum status enc_set_key(const wsrep::const_buffer& key) = 0;
virtual std::vector<status_variable> status() const = 0;
virtual void reset_status() = 0;