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

removing previous_primary_view from public iface and style fixes

This commit is contained in:
Leandro Pacheco
2019-03-05 10:34:30 +01:00
parent 71f3fb2d01
commit 5ef5becea6
2 changed files with 4 additions and 6 deletions

View File

@ -355,10 +355,6 @@ namespace wsrep
* Return current view * Return current view
*/ */
const wsrep::view& current_view() const { return current_view_; } const wsrep::view& current_view() const { return current_view_; }
/**
* Return the previous primary view
*/
const wsrep::view& previous_primary_view() const { return previous_primary_view_; }
/** /**
* Set last committed GTID. * Set last committed GTID.
*/ */

View File

@ -612,7 +612,8 @@ void wsrep::server_state::sst_received(wsrep::client_service& cs,
throw wsrep::runtime_error(msg.str()); throw wsrep::runtime_error(msg.str());
} }
if (current_view_.status() == wsrep::view::primary) { if (current_view_.status() == wsrep::view::primary)
{
previous_primary_view_ = current_view_; previous_primary_view_ = current_view_;
} }
current_view_ = v; current_view_ = v;
@ -901,7 +902,8 @@ void wsrep::server_state::on_view(const wsrep::view& view,
<< "name: " << i->name(); << "name: " << i->name();
} }
wsrep::log_info() << "================================================="; wsrep::log_info() << "=================================================";
if (current_view_.status() == wsrep::view::primary) { if (current_view_.status() == wsrep::view::primary)
{
previous_primary_view_ = current_view_; previous_primary_view_ = current_view_;
} }
current_view_ = view; current_view_ = view;